blob: 0aac8810a037b3f4dded4f06c361dc30d6c90bcf [file] [log] [blame]
Scott Bakerc9d3d842021-09-17 11:32:53 -07001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
Sean Condon160ec1d2022-02-08 12:58:25 +00003// SPDX-License-Identifier: Apache-2.0
Scott Bakerc9d3d842021-09-17 11:32:53 -07004
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 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000037 description "The typedef for device-group-id";
Scott Bakerebb99ae2021-11-01 15:34:51 -070038 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070039
40 container device-group {
41 description "The top level container";
42
43 list device-group {
44 key "id";
45 description
46 "List of device groups";
47
48 leaf id {
49 type device-group-id;
50 description "ID for this device group.";
51 }
52
53 leaf description {
54 type at:description;
55 description "description of this device group";
56 }
57
58 leaf display-name {
59 type string {
60 length 1..80;
61 }
62 description "display name to use in GUI or CLI";
Scott Bakerebb99ae2021-11-01 15:34:51 -070063 }
64
Scott Bakerc9d3d842021-09-17 11:32:53 -070065 list imsis {
66 // TODO: imsi-range-from cannot be used as a list index
Scott Bakerc4b3e272021-11-01 17:13:48 -070067 key "imsi-id";
68 leaf imsi-id {
Scott Bakerebb99ae2021-11-01 15:34:51 -070069 type yg:yang-identifier;
70 description
71 "Id of this imsi-range";
Scott Bakerc9d3d842021-09-17 11:32:53 -070072 }
73 leaf imsi-range-from {
74 type uint64;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000075 description
76 "value of imsi-range-from";
Scott Bakerc9d3d842021-09-17 11:32:53 -070077 }
78 leaf imsi-range-to {
79 type uint64;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000080 description
81 "value of imsi-range-to";
Scott Bakerc9d3d842021-09-17 11:32:53 -070082 }
Scott Bakerebb99ae2021-11-01 15:34:51 -070083 leaf display-name {
84 type string {
85 length 1..80;
86 }
87 description "display name to use in GUI or CLI";
88 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070089 description
90 "List of imsi ranges that comprise this group. It's acceptable for
91 a range to degenerate to being a singleton";
92 }
93
94 leaf ip-domain {
95 type leafref {
96 path "/ipd:ip-domain/ipd:ip-domain/ipd:id";
Scott Bakercd276412021-10-13 14:31:24 -070097 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070098 description
99 "Link to ip-domain settings that determine the pool of IP addresses,
100 as well as the domain resolver settings to use";
101 }
102
Scott Bakercd276412021-10-13 14:31:24 -0700103 container device {
104 description "Per-device QOS Settings";
105 container mbr {
106 description "Maximum bitrate";
107 leaf uplink {
108 type at:bitrate;
109 units bps;
Scott Baker36c96142021-10-19 14:13:30 -0700110 mandatory true;
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000111 description "Per-device MBR uplink data rate in bps";
Scott Bakercd276412021-10-13 14:31:24 -0700112 }
113
114 leaf downlink {
115 type at:bitrate;
116 units bps;
Scott Baker36c96142021-10-19 14:13:30 -0700117 mandatory true;
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000118 description "Per-device MBR downlink data rate in bps";
Scott Bakercd276412021-10-13 14:31:24 -0700119 }
120 }
Scott Baker988705a2021-10-13 17:24:49 -0700121 leaf traffic-class {
122 type leafref {
123 path "/tc:traffic-class/tc:traffic-class/tc:id";
124 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000125 mandatory true;
Scott Baker988705a2021-10-13 17:24:49 -0700126 description
127 "Link to traffic class";
128 }
Scott Bakercd276412021-10-13 14:31:24 -0700129 }
130
Scott Bakerc9d3d842021-09-17 11:32:53 -0700131 leaf site {
132 type leafref {
133 path "/st:site/st:site/st:id";
134 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000135 mandatory true;
Scott Bakerc9d3d842021-09-17 11:32:53 -0700136 description
137 "Link to site";
138 }
139 }
Scott Baker988705a2021-10-13 17:24:49 -0700140 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700141}