blob: 12d89c76ac70a665553dd1a5090f459ae45bdd36 [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";
17 description
18 "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 }
37 }
38
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";
62 }
63
64 list imsis {
65 // TODO: imsi-range-from cannot be used as a list index
66 key "name";
67 leaf name {
68 type string;
69 }
70 leaf imsi-range-from {
71 type uint64;
72 }
73 leaf imsi-range-to {
74 type uint64;
75 }
76 description
77 "List of imsi ranges that comprise this group. It's acceptable for
78 a range to degenerate to being a singleton";
79 }
80
81 leaf ip-domain {
82 type leafref {
83 path "/ipd:ip-domain/ipd:ip-domain/ipd:id";
Scott Bakercd276412021-10-13 14:31:24 -070084 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070085 description
86 "Link to ip-domain settings that determine the pool of IP addresses,
87 as well as the domain resolver settings to use";
88 }
89
Scott Bakercd276412021-10-13 14:31:24 -070090 container device {
91 description "Per-device QOS Settings";
92 container mbr {
93 description "Maximum bitrate";
94 leaf uplink {
95 type at:bitrate;
96 units bps;
Scott Baker3f1cb272021-10-26 14:28:05 -070097 description "Per-device MBR uplink data rate in bps";
Scott Baker36c96142021-10-19 14:13:30 -070098 mandatory true;
Scott Bakercd276412021-10-13 14:31:24 -070099 }
100
101 leaf downlink {
102 type at:bitrate;
103 units bps;
Scott Baker3f1cb272021-10-26 14:28:05 -0700104 description "Per-device MBR downlink data rate in bps";
Scott Baker36c96142021-10-19 14:13:30 -0700105 mandatory true;
Scott Bakercd276412021-10-13 14:31:24 -0700106 }
107 }
Scott Baker988705a2021-10-13 17:24:49 -0700108 leaf traffic-class {
109 type leafref {
110 path "/tc:traffic-class/tc:traffic-class/tc:id";
111 }
112 description
113 "Link to traffic class";
Scott Baker36c96142021-10-19 14:13:30 -0700114 mandatory true;
Scott Baker988705a2021-10-13 17:24:49 -0700115 }
Scott Bakercd276412021-10-13 14:31:24 -0700116 }
117
Scott Bakerc9d3d842021-09-17 11:32:53 -0700118 leaf site {
119 type leafref {
120 path "/st:site/st:site/st:id";
121 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700122 description
123 "Link to site";
Scott Baker36c96142021-10-19 14:13:30 -0700124 mandatory true;
Scott Bakerc9d3d842021-09-17 11:32:53 -0700125 }
126 }
Scott Baker988705a2021-10-13 17:24:49 -0700127 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700128}