blob: d1f43c96b2bb8b95654ee598478bb151680c6166 [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; }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000014 import enterprise{ prefix ent; }
Scott Bakerc9d3d842021-09-17 11:32:53 -070015 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 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000032 description "The typedef for mmc";
Scott Bakerc9d3d842021-09-17 11:32:53 -070033 }
34
35 typedef mnc {
36 type uint32 {
37 range 0..999;
38 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000039 description "The typedef for mnc";
Scott Bakerc9d3d842021-09-17 11:32:53 -070040 }
41
42 typedef tac {
43 type uint32 {
44 range 0..99999999;
45 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000046 description "The typedef for tac";
Scott Bakerc9d3d842021-09-17 11:32:53 -070047 }
48
49 container subscriber {
50 description "The top level container";
51
52 list ue {
53 key "id";
54 description
55 "List of subscriber devices";
56
57 leaf id {
Scott Bakerc9d3d842021-09-17 11:32:53 -070058 type ietf:uuid;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000059 description "identifier for this subscriber, typically a UUID";
Scott Bakerc9d3d842021-09-17 11:32:53 -070060 }
61
62 leaf display-name {
63 type string {
64 length 1..80;
65 }
66 description "display name to use in GUI or CLI";
PUSHP RAJba2e32f2021-11-02 10:39:24 +000067 }
Scott Bakerc9d3d842021-09-17 11:32:53 -070068
69 choice imsi {
70 case wildcard {
71 leaf imsi-wildcard {
72 type string {
73 length 1..15;
74 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000075 description "The typedef for imsi-wildcard";
Scott Bakerc9d3d842021-09-17 11:32:53 -070076 }
77 }
78 case range {
79 leaf imsi-range-from {
80 type uint64;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000081 description "The typedef for imsi-range-from";
Scott Bakerc9d3d842021-09-17 11:32:53 -070082 }
83 leaf imsi-range-to {
84 type uint64;
PUSHP RAJba2e32f2021-11-02 10:39:24 +000085 description "The typedef for imsi-range-to";
Scott Bakerc9d3d842021-09-17 11:32:53 -070086 }
87 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +000088 description "The choice for imsi";
Scott Bakerc9d3d842021-09-17 11:32:53 -070089 }
90
91 container serving-plmn {
92 leaf mcc {
93 type mcc;
94 description "mobile country code";
95 }
96 leaf mnc {
97 type mnc;
98 description "mobile network code";
99 }
100 leaf tac {
101 type tac;
102 description "type allocation code";
103 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000104 description "The container for serving-plmn";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700105 }
106
107 leaf requested-apn {
108 type string {
109 length 0..31;
110 }
111 description "requested access point name";
112 }
113
114 leaf priority {
115 type uint32 {
116 range 0..1000;
117 }
118 default 0;
119 description
120 "Priority for this subscriber range";
121 }
122
123 leaf enabled {
124 type boolean;
125 default false;
126 description
127 "Enable or disable this ue";
128 }
129
130 leaf enterprise {
131 type leafref {
132 path "/ent:enterprise/ent:enterprise/ent:id";
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000133 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700134 description
135 "Link to enterprise that owns this UE range";
136 }
137
138 container profiles {
139 leaf apn-profile {
140 type leafref {
141 path "/apn:apn-profile/apn:apn-profile/apn:id";
142 }
143 description
144 "Link to apn profile";
145 }
146 leaf up-profile {
147 type leafref {
148 path "/up:up-profile/up:up-profile/up:id";
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000149 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700150 description
151 "Link to user plane profile";
152 }
153 leaf qos-profile {
154 type leafref {
155 path "/qos:qos-profile/qos:qos-profile/qos:id";
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000156 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700157 description
158 "Link to qos profile";
159 }
160 list access-profile {
161 key "access-profile";
162 leaf access-profile {
163 type leafref {
164 path "/ap:access-profile/ap:access-profile/ap:id";
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000165 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700166 description
167 "Link to access profile";
168 }
169 leaf allowed {
170 type boolean;
171 default true;
172 description
173 "Allow or disallow this ue to use this access profile";
174 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000175 description "The list for access-profile";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700176 }
177 leaf security-profile {
178 type leafref {
179 path "/sec:security-profile/sec:security-profile/sec:id";
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000180 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700181 description
182 "Link to security profile";
183 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000184 description "The container for profiles";
Scott Bakerc9d3d842021-09-17 11:32:53 -0700185 }
186 }
PUSHP RAJba2e32f2021-11-02 10:39:24 +0000187 }
Scott Bakerc9d3d842021-09-17 11:32:53 -0700188}