blob: 963217f38033ad9aaf422747a647517af46d7c9c [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
14 organization "Open Networking Foundation.";
15 contact "Scott Baker";
16 description "To generate JSON from this use command
17 pyang -f jtoxx test1.yang | python3 -m json.tool > test1.json
18 Copied from YangUIComponents project";
19
20 revision "2020-08-18" {
21 description "An Aether Subscriber";
22 reference "RFC 6087";
23 }
24
25 // User Equipment ID (UEID), Basically an IMSI range
26 // examples:
27 // 123456789??????? ... wildcard at the end
28 // 123456???0123455 ... wildcard in the middle
29 // 1234567890000000-123456789000005 ... range
30 typedef ueid {
31 type string {
32 length 1..31;
33 }
34 }
35
36 typedef mcc {
37 type uint32 {
38 range 0..999;
39 }
40 }
41
42 typedef mnc {
43 type uint32 {
44 range 0..999;
45 }
46 }
47
48 typedef tac {
49 type uint32 {
50 range 0..99999999;
51 }
52 }
53
54 container subscriber {
55 description "The top level container";
56
57 list ue {
58 key "ueid";
59 description
60 "List of subscriber devices";
61
62 leaf ueid {
63 description "identifier for this subscriber, may or may not be an IMSI";
64 type ueid;
65 }
66
67 container serving-plmn {
68 leaf mcc {
69 type mcc;
70 description "mobile country code";
71 }
72 leaf mnc {
73 type mnc;
74 description "mobile network code";
75 }
76 leaf tac {
77 type tac;
78 description "type allocation code";
79 }
80 }
81
82 leaf requested-apn {
83 type string {
84 length 1..31;
85 }
86 description "requested access point name";
87 }
88
89 leaf priority {
90 type uint32 {
91 range 0..1000;
92 }
93 default 0;
94 description
95 "Priority for this subscriber range";
96 }
97
98 leaf enabled {
99 type boolean;
100 default false;
101 description
102 "Enable or disable this ue";
103 }
104
105 container profiles {
106 leaf apn-profile {
107 type leafref {
108 path "/apn:apn-profile/apn:apn-profile/apn:id";
109 }
110 description
111 "Link to apn profile";
112 }
113 leaf up-profile {
114 type leafref {
115 path "/up:up-profile/up:up-profile/up:id";
116 }
117 description
118 "Link to user plane profile";
119 }
120 leaf qos-profile {
121 type leafref {
122 path "/qos:qos-profile/qos:qos-profile/qos:id";
123 }
124 description
125 "Link to qos profile";
126 }
127 list access-profile {
128 key "access-profile";
129 leaf access-profile {
130 type leafref {
131 path "/ap:access-profile/ap:access-profile/ap:id";
132 }
133// type ap:access-profile-id;
134 description
135 "Link to access profile";
136 }
137 leaf allowed {
138 type boolean;
139 default true;
140 description
141 "Allow or disallow this ue to use this access profile";
142 }
143 }
144 }
145 }
146 }
147}