blob: e9c15904051f7864f45aacfaa7bb4bf5a9b89fcc [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 device-group {
6 namespace "http://opennetworking.org/aether/device-group";
7 prefix dg;
8
9 import aether-types { prefix at; }
10 import ip-domain{ prefix ipd; }
11 import site{ prefix st; }
12 import ietf-yang-types{ prefix yg; }
13
14 organization "Open Networking Foundation.";
15 contact "Scott Baker";
16 description
17 "An aether device group represents a list of device IMSIS.
18 This list is expressed as a set of ranges,
19 [(from_imsi, to_imsi),
20 (from_imsi, to_imsi),
21 ...].
22 Each device group belongs to a site and has associated
23 with it an ip-profile that determines the IP address
24 and DNS settings that apply to devices within the
25 group";
26
27 revision "2021-06-02" {
28 description "An Aether Device Group";
29 reference "RFC 6087";
30 }
31
32 typedef device-group-id {
33 type yg:yang-identifier {
34 length 1..32;
35 }
36 }
37
38 container device-group {
39 description "The top level container";
40
41 list device-group {
42 key "id";
43 description
44 "List of device groups";
45
46 leaf id {
47 type device-group-id;
48 description "ID for this device group.";
49 }
50
51 leaf description {
52 type at:description;
53 description "description of this device group";
54 }
55
56 leaf display-name {
57 type string {
58 length 1..80;
59 }
60 description "display name to use in GUI or CLI";
61 }
62
63 list imsis {
64 // TODO: imsi-range-from cannot be used as a list index
65 key "name";
66 leaf name {
67 type string;
68 }
69 leaf imsi-range-from {
70 type uint64;
71 }
72 leaf imsi-range-to {
73 type uint64;
74 }
75 description
76 "List of imsi ranges that comprise this group. It's acceptable for
77 a range to degenerate to being a singleton";
78 }
79
80 leaf ip-domain {
81 type leafref {
82 path "/ipd:ip-domain/ipd:ip-domain/ipd:id";
83 }
84 description
85 "Link to ip-domain settings that determine the pool of IP addresses,
86 as well as the domain resolver settings to use";
87 }
88
89 leaf site {
90 type leafref {
91 path "/st:site/st:site/st:id";
92 }
93 mandatory true;
94 description
95 "Link to site";
96 }
97 }
98 }
99}