blob: e8257236b30413514a5e4aa6205d3a7b1cbcac8a [file] [log] [blame]
Scott Bakerfdbad762022-01-03 16:00:45 -08001// SPDX-FileCopyrightText: 2021 Open Networking Foundation
2//
Sean Condon160ec1d2022-02-08 12:58:25 +00003// SPDX-License-Identifier: Apache-2.0
Scott Bakerfdbad762022-01-03 16:00:45 -08004
5module onf-aether-types {
6 namespace "http://opennetworking.org/aether/aether-types";
7 prefix at;
8
9 import ietf-inet-types { prefix inet; }
10
11 organization "Open Networking Foundation.";
12 contact "Scott Baker";
13 description "A set of base types for aether modeling.";
14
15 revision "2021-09-10" {
16 description "Aether Base Types";
17 reference "RFC 6087";
18 }
19
Scott Baker40a79562022-02-16 15:04:50 -080020 typedef aether-identifier {
21 type string {
22 length 1..63;
23 pattern '[a-z]([a-z0-9-]?[a-z0-9])*';
24 }
25 description "Identifier for objects in the Aether modeling";
26 }
27
Scott Baker4fb4ba92022-01-14 13:52:01 -080028 typedef imsi {
29 type uint64 {
30 }
31 description "International Mobile Subscriber Identity";
32 }
33
34 typedef imei {
Scott Baker985fb602022-02-14 17:03:39 -080035 type string {
36 length 14..16;
37 pattern '[0-9]{14,16}';
Scott Baker4fb4ba92022-01-14 13:52:01 -080038 }
39 description "International Mobile Equipment Identity";
40 }
41
42 typedef iccid {
Scott Baker985fb602022-02-14 17:03:39 -080043 type string {
44 length 19..22;
45 pattern '[0-9]{18,21}[0-9A-F]';
46 }
Scott Baker4fb4ba92022-01-14 13:52:01 -080047 description "Integrated Circuit Card ID";
48 }
49
Scott Bakerfdbad762022-01-03 16:00:45 -080050 typedef bitrate {
51 type uint64 {
52 }
53 description "The typedef for bitrate";
54 }
55
56 typedef burst {
57 type uint32 {
58 }
59 default 625000;
60 description "The typedef for burst";
61 }
62
63 typedef mcc {
64 type string {
65 pattern '[0-9]{3}';
66 }
67 description "The typedef for mcc";
68 }
69
70 typedef mnc {
71 type string {
72 pattern '[0-9]{2,3}';
73 }
74 description "The typedef for mnc";
75 }
76
77 typedef tac {
78 type string {
79 length 4..8;
80 pattern '[0-9A-F\.]*';
81 }
82 description "The typedef for tac";
83 }
84
85 typedef ent {
86 type uint32 {
87 range 0..999;
88 }
89 description "The typedef for ent";
90 }
91
92 typedef dnn {
93 type string {
94 length 1..32;
95 }
96 description "The typedef for dnn";
97 }
98
99 typedef sst {
100 type uint8 {
101 range 1..255;
102 }
103 description "The typedef for sst";
104 }
105
106 typedef sd {
107 type uint32 {
108 range 0..16777215;
109 }
110 description "The typedef for sd";
111 }
112
113 typedef qci {
114 type uint8 {
115 range 1..32;
116 }
117 description "The typedef for qci";
118 }
119
120 typedef arp {
121 type uint8 {
122 range 1..15;
123 }
124 description "The typedef for arp";
125 }
126
127 typedef pelr {
128 type int8 {
129 range 0..10;
130 }
131 description "The typedef for pelr";
132 }
133
134 typedef pdb {
135 type uint16 {
136 range 0..1000;
137 }
138 description "The typedef for pdb";
139 }
140
141 typedef priority {
142 type uint8 {
143 // priorities 201-255 are reserved for system use
144 range 0..200;
145 }
146 description "The typedef for priority";
147 }
148
149 // "TCP" or "UDP"
150 typedef protocol {
151 type string {
152 length 3;
153 pattern "TCP|UDP";
154 }
155 default "TCP";
156 description "The typedef for protocol";
157 }
158
159 // "ENABLE" | "MAINTENTANCE" | "DISABLE"
160 typedef admin-status {
161 type string {
162 length 0..16;
163 pattern "ENABLE|MAINTENANCE|DISABLE";
164 }
165 default "ENABLE";
166 description "The typedef for admin-status";
167 }
168
169 typedef behavior {
170 type string {
171 length 0..20;
172 pattern "DENY-ALL|ALLOW-ALL|ALLOW-PUBLIC";
173 }
174 description "The typedef for behavior";
175 }
176
177 typedef mtu {
178 type inet:port-number;
179 default 1492;
180 description "The typedef for mtu";
181 }
182
183 typedef description {
184 type string {
185 length 1..1024;
186 }
187 description "The typedef for description";
188 }
Sean Condon9f7966e2022-02-03 10:55:06 +0000189
190 grouping desc-display-name {
191 description "reusable leafs for description and display-name";
192 leaf display-name {
193 type string {
194 length 1..80;
195 }
196 description "display name to use in GUI or CLI";
197 }
198
199 leaf description {
200 type description;
201 description "long description field";
202 }
203 }
Scott Bakeree0a68f2022-02-07 16:35:43 -0800204
205 typedef ipv4-subnet {
206 type string {
207 pattern
208 '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
209 + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
210 + '(/([0-9]|[1-2][0-9]|3[0-2]))';
211 }
212 description "IPv4 network in CIDR notation";
213 }
214
215 typedef host-or-network {
216 type union {
217 type inet:host;
218 type ipv4-subnet;
219 }
220 description "hostname, ip-address, or network";
221 }
Scott Bakerfdbad762022-01-03 16:00:45 -0800222}
Scott Bakeree0a68f2022-02-07 16:35:43 -0800223