blob: 30f3e52d58161fca28f6f5eed28e419e33cfb3ca [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 aether-subscriber {
6 namespace "http://opennetworking.org/aether/subscriber";
7 prefix sub;
8
9 import apn-profile{ prefix apn; }
10 import qos-profile{ prefix qos; }
11 import up-profile{ prefix up; }
12 import access-profile{ prefix ap; }
13 import security-profile{ prefix sec; }
14 import enterprise{ prefix ent; }
15 import ietf-yang-types{ prefix ietf; }
16
17 organization "Open Networking Foundation.";
18 contact "Scott Baker";
19 description "To generate JSON from this use command
20 pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json
21 Copied from YangUIComponents project";
22
23 revision "2020-10-22" {
24 description "An Aether Subscriber";
25 reference "RFC 6087";
26 }
27
28 typedef mcc {
29 type uint32 {
30 range 0..999;
31 }
32 }
33
34 typedef mnc {
35 type uint32 {
36 range 0..999;
37 }
38 }
39
40 typedef tac {
41 type uint32 {
42 range 0..99999999;
43 }
44 }
45
46 container subscriber {
47 description "The top level container";
48
49 list ue {
50 key "id";
51 description
52 "List of subscriber devices";
53
54 leaf id {
55 description "identifier for this subscriber, typically a UUID";
56 type ietf:uuid;
57 }
58
59 leaf display-name {
60 type string {
61 length 1..80;
62 }
63 description "display name to use in GUI or CLI";
64 }
65
66 choice imsi {
67 case wildcard {
68 leaf imsi-wildcard {
69 type string {
70 length 1..15;
71 }
72 }
73 }
74 case range {
75 leaf imsi-range-from {
76 type uint64;
77 }
78 leaf imsi-range-to {
79 type uint64;
80 }
81 }
82 }
83
84 container serving-plmn {
85 leaf mcc {
86 type mcc;
87 description "mobile country code";
88 }
89 leaf mnc {
90 type mnc;
91 description "mobile network code";
92 }
93 leaf tac {
94 type tac;
95 description "type allocation code";
96 }
97 }
98
99 leaf requested-apn {
100 type string {
101 length 0..31;
102 }
103 description "requested access point name";
104 }
105
106 leaf priority {
107 type uint32 {
108 range 0..1000;
109 }
110 default 0;
111 description
112 "Priority for this subscriber range";
113 }
114
115 leaf enabled {
116 type boolean;
117 default false;
118 description
119 "Enable or disable this ue";
120 }
121
122 leaf enterprise {
123 type leafref {
124 path "/ent:enterprise/ent:enterprise/ent:id";
125 }
126 description
127 "Link to enterprise that owns this UE range";
128 }
129
130 container profiles {
131 leaf apn-profile {
132 type leafref {
133 path "/apn:apn-profile/apn:apn-profile/apn:id";
134 }
135 description
136 "Link to apn profile";
137 }
138 leaf up-profile {
139 type leafref {
140 path "/up:up-profile/up:up-profile/up:id";
141 }
142 description
143 "Link to user plane profile";
144 }
145 leaf qos-profile {
146 type leafref {
147 path "/qos:qos-profile/qos:qos-profile/qos:id";
148 }
149 description
150 "Link to qos profile";
151 }
152 list access-profile {
153 key "access-profile";
154 leaf access-profile {
155 type leafref {
156 path "/ap:access-profile/ap:access-profile/ap:id";
157 }
158 description
159 "Link to access profile";
160 }
161 leaf allowed {
162 type boolean;
163 default true;
164 description
165 "Allow or disallow this ue to use this access profile";
166 }
167 }
168 leaf security-profile {
169 type leafref {
170 path "/sec:security-profile/sec:security-profile/sec:id";
171 }
172 description
173 "Link to security profile";
174 }
175 }
176 }
177 }
178}