blob: 87295db414294f699bc7fbdefd5afdc885599e5b [file] [log] [blame]
Scott Bakerc9d3d842021-09-17 11:32:53 -07001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
3// SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5module onf-device-group {
6 namespace "http://opennetworking.org/aether/device-group";
7 prefix dg;
8
9 import ietf-yang-types{ prefix yg; }
10 import onf-aether-types { prefix at; }
11 import onf-ip-domain{ prefix ipd; }
12 import onf-site{ prefix st; }
Scott Baker988705a2021-10-13 17:24:49 -070013 import onf-traffic-class{ prefix tc; }
Scott Bakerc9d3d842021-09-17 11:32:53 -070014
15 organization "Open Networking Foundation.";
16 contact "Scott Baker";
Scott Bakerebb99ae2021-11-01 15:34:51 -070017 description
Scott Bakerc9d3d842021-09-17 11:32:53 -070018 "An aether device group represents a list of device IMSIS.
19 This list is expressed as a set of ranges,
20 [(from_imsi, to_imsi),
21 (from_imsi, to_imsi),
22 ...].
23 Each device group belongs to a site and has associated
24 with it an ip-profile that determines the IP address
25 and DNS settings that apply to devices within the
26 group";
27
28 revision "2021-06-02" {
29 description "An Aether Device Group";
30 reference "RFC 6087";
31 }
32
33 typedef device-group-id {
34 type yg:yang-identifier {
35 length 1..32;
36 }
Scott Bakerebb99ae2021-11-01 15:34:51 -070037 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070038
39 container device-group {
40 description "The top level container";
41
42 list device-group {
43 key "id";
44 description
45 "List of device groups";
46
47 leaf id {
48 type device-group-id;
49 description "ID for this device group.";
50 }
51
52 leaf description {
53 type at:description;
54 description "description of this device group";
55 }
56
57 leaf display-name {
58 type string {
59 length 1..80;
60 }
61 description "display name to use in GUI or CLI";
Scott Bakerebb99ae2021-11-01 15:34:51 -070062 }
63
Scott Bakerc9d3d842021-09-17 11:32:53 -070064 list imsis {
65 // TODO: imsi-range-from cannot be used as a list index
Scott Bakerc4b3e272021-11-01 17:13:48 -070066 key "imsi-id";
67 leaf imsi-id {
Scott Bakerebb99ae2021-11-01 15:34:51 -070068 type yg:yang-identifier;
69 description
70 "Id of this imsi-range";
Scott Bakerc9d3d842021-09-17 11:32:53 -070071 }
72 leaf imsi-range-from {
73 type uint64;
74 }
75 leaf imsi-range-to {
76 type uint64;
77 }
Scott Bakerebb99ae2021-11-01 15:34:51 -070078 leaf display-name {
79 type string {
80 length 1..80;
81 }
82 description "display name to use in GUI or CLI";
83 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070084 description
85 "List of imsi ranges that comprise this group. It's acceptable for
86 a range to degenerate to being a singleton";
87 }
88
89 leaf ip-domain {
90 type leafref {
91 path "/ipd:ip-domain/ipd:ip-domain/ipd:id";
Scott Bakercd276412021-10-13 14:31:24 -070092 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070093 description
94 "Link to ip-domain settings that determine the pool of IP addresses,
95 as well as the domain resolver settings to use";
96 }
97
Scott Bakercd276412021-10-13 14:31:24 -070098 container device {
99 description "Per-device QOS Settings";
100 container mbr {
101 description "Maximum bitrate";
102 leaf uplink {
103 type at:bitrate;
104 units bps;
Scott Baker3f1cb272021-10-26 14:28:05 -0700105 description "Per-device MBR uplink data rate in bps";
Scott Baker36c96142021-10-19 14:13:30 -0700106 mandatory true;
Scott Bakercd276412021-10-13 14:31:24 -0700107 }
108
109 leaf downlink {
110 type at:bitrate;
111 units bps;
Scott Baker3f1cb272021-10-26 14:28:05 -0700112 description "Per-device MBR downlink data rate in bps";
Scott Baker36c96142021-10-19 14:13:30 -0700113 mandatory true;
Scott Bakercd276412021-10-13 14:31:24 -0700114 }
115 }
Scott Baker988705a2021-10-13 17:24:49 -0700116 leaf traffic-class {
117 type leafref {
118 path "/tc:traffic-class/tc:traffic-class/tc:id";
119 }
120 description
121 "Link to traffic class";
Scott Baker36c96142021-10-19 14:13:30 -0700122 mandatory true;
Scott Baker988705a2021-10-13 17:24:49 -0700123 }
Scott Bakercd276412021-10-13 14:31:24 -0700124 }
125
Scott Bakerc9d3d842021-09-17 11:32:53 -0700126 leaf site {
127 type leafref {
128 path "/st:site/st:site/st:id";
129 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700130 description
131 "Link to site";
Scott Baker36c96142021-10-19 14:13:30 -0700132 mandatory true;
Scott Bakerc9d3d842021-09-17 11:32:53 -0700133 }
134 }
Scott Baker988705a2021-10-13 17:24:49 -0700135 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700136}