blob: feb0337ae3535031e4410c1a5315a94fc339abcd [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";
PUSHP RAJba2e32f2021-11-02 10:39:24 +000016 description
Scott Bakerc9d3d842021-09-17 11:32:53 -070017 "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 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000036 description "The typedef for device-group-id";
37 }
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";
PUSHP RAJba2e32f2021-11-02 10:39:24 +000062 }
63
Scott Bakerc9d3d842021-09-17 11:32:53 -070064 list imsis {
65 // TODO: imsi-range-from cannot be used as a list index
66 key "name";
67 leaf name {
68 type string;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000069 description "The leaf for imsi name";
Scott Bakerc9d3d842021-09-17 11:32:53 -070070 }
71 leaf imsi-range-from {
72 type uint64;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000073 description "The leaf for imsi-range-from";
Scott Bakerc9d3d842021-09-17 11:32:53 -070074 }
75 leaf imsi-range-to {
76 type uint64;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000077 description "The leaf for imsi-range-to";
Scott Bakerc9d3d842021-09-17 11:32:53 -070078 }
79 description
80 "List of imsi ranges that comprise this group. It's acceptable for
81 a range to degenerate to being a singleton";
82 }
83
84 leaf ip-domain {
85 type leafref {
86 path "/ipd:ip-domain/ipd:ip-domain/ipd:id";
PUSHP RAJba2e32f2021-11-02 10:39:24 +000087 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070088 description
89 "Link to ip-domain settings that determine the pool of IP addresses,
90 as well as the domain resolver settings to use";
91 }
92
93 leaf site {
94 type leafref {
95 path "/st:site/st:site/st:id";
96 }
97 mandatory true;
98 description
99 "Link to site";
100 }
101 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000102 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700103}