Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2021 Open Networking Foundation |
| 2 | // |
Sean Condon | 160ec1d | 2022-02-08 12:58:25 +0000 | [diff] [blame] | 3 | // SPDX-License-Identifier: Apache-2.0 |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 4 | |
| 5 | module 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 Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 20 | typedef imsi { |
| 21 | type uint64 { |
| 22 | } |
| 23 | description "International Mobile Subscriber Identity"; |
| 24 | } |
| 25 | |
| 26 | typedef imei { |
Scott Baker | 985fb60 | 2022-02-14 17:03:39 -0800 | [diff] [blame^] | 27 | type string { |
| 28 | length 14..16; |
| 29 | pattern '[0-9]{14,16}'; |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 30 | } |
| 31 | description "International Mobile Equipment Identity"; |
| 32 | } |
| 33 | |
| 34 | typedef iccid { |
Scott Baker | 985fb60 | 2022-02-14 17:03:39 -0800 | [diff] [blame^] | 35 | type string { |
| 36 | length 19..22; |
| 37 | pattern '[0-9]{18,21}[0-9A-F]'; |
| 38 | } |
Scott Baker | 4fb4ba9 | 2022-01-14 13:52:01 -0800 | [diff] [blame] | 39 | description "Integrated Circuit Card ID"; |
| 40 | } |
| 41 | |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 42 | typedef bitrate { |
| 43 | type uint64 { |
| 44 | } |
| 45 | description "The typedef for bitrate"; |
| 46 | } |
| 47 | |
| 48 | typedef burst { |
| 49 | type uint32 { |
| 50 | } |
| 51 | default 625000; |
| 52 | description "The typedef for burst"; |
| 53 | } |
| 54 | |
| 55 | typedef mcc { |
| 56 | type string { |
| 57 | pattern '[0-9]{3}'; |
| 58 | } |
| 59 | description "The typedef for mcc"; |
| 60 | } |
| 61 | |
| 62 | typedef mnc { |
| 63 | type string { |
| 64 | pattern '[0-9]{2,3}'; |
| 65 | } |
| 66 | description "The typedef for mnc"; |
| 67 | } |
| 68 | |
| 69 | typedef tac { |
| 70 | type string { |
| 71 | length 4..8; |
| 72 | pattern '[0-9A-F\.]*'; |
| 73 | } |
| 74 | description "The typedef for tac"; |
| 75 | } |
| 76 | |
| 77 | typedef ent { |
| 78 | type uint32 { |
| 79 | range 0..999; |
| 80 | } |
| 81 | description "The typedef for ent"; |
| 82 | } |
| 83 | |
| 84 | typedef dnn { |
| 85 | type string { |
| 86 | length 1..32; |
| 87 | } |
| 88 | description "The typedef for dnn"; |
| 89 | } |
| 90 | |
| 91 | typedef sst { |
| 92 | type uint8 { |
| 93 | range 1..255; |
| 94 | } |
| 95 | description "The typedef for sst"; |
| 96 | } |
| 97 | |
| 98 | typedef sd { |
| 99 | type uint32 { |
| 100 | range 0..16777215; |
| 101 | } |
| 102 | description "The typedef for sd"; |
| 103 | } |
| 104 | |
| 105 | typedef qci { |
| 106 | type uint8 { |
| 107 | range 1..32; |
| 108 | } |
| 109 | description "The typedef for qci"; |
| 110 | } |
| 111 | |
| 112 | typedef arp { |
| 113 | type uint8 { |
| 114 | range 1..15; |
| 115 | } |
| 116 | description "The typedef for arp"; |
| 117 | } |
| 118 | |
| 119 | typedef pelr { |
| 120 | type int8 { |
| 121 | range 0..10; |
| 122 | } |
| 123 | description "The typedef for pelr"; |
| 124 | } |
| 125 | |
| 126 | typedef pdb { |
| 127 | type uint16 { |
| 128 | range 0..1000; |
| 129 | } |
| 130 | description "The typedef for pdb"; |
| 131 | } |
| 132 | |
| 133 | typedef priority { |
| 134 | type uint8 { |
| 135 | // priorities 201-255 are reserved for system use |
| 136 | range 0..200; |
| 137 | } |
| 138 | description "The typedef for priority"; |
| 139 | } |
| 140 | |
| 141 | // "TCP" or "UDP" |
| 142 | typedef protocol { |
| 143 | type string { |
| 144 | length 3; |
| 145 | pattern "TCP|UDP"; |
| 146 | } |
| 147 | default "TCP"; |
| 148 | description "The typedef for protocol"; |
| 149 | } |
| 150 | |
| 151 | // "ENABLE" | "MAINTENTANCE" | "DISABLE" |
| 152 | typedef admin-status { |
| 153 | type string { |
| 154 | length 0..16; |
| 155 | pattern "ENABLE|MAINTENANCE|DISABLE"; |
| 156 | } |
| 157 | default "ENABLE"; |
| 158 | description "The typedef for admin-status"; |
| 159 | } |
| 160 | |
| 161 | typedef behavior { |
| 162 | type string { |
| 163 | length 0..20; |
| 164 | pattern "DENY-ALL|ALLOW-ALL|ALLOW-PUBLIC"; |
| 165 | } |
| 166 | description "The typedef for behavior"; |
| 167 | } |
| 168 | |
| 169 | typedef mtu { |
| 170 | type inet:port-number; |
| 171 | default 1492; |
| 172 | description "The typedef for mtu"; |
| 173 | } |
| 174 | |
| 175 | typedef description { |
| 176 | type string { |
| 177 | length 1..1024; |
| 178 | } |
| 179 | description "The typedef for description"; |
| 180 | } |
Sean Condon | 9f7966e | 2022-02-03 10:55:06 +0000 | [diff] [blame] | 181 | |
| 182 | grouping desc-display-name { |
| 183 | description "reusable leafs for description and display-name"; |
| 184 | leaf display-name { |
| 185 | type string { |
| 186 | length 1..80; |
| 187 | } |
| 188 | description "display name to use in GUI or CLI"; |
| 189 | } |
| 190 | |
| 191 | leaf description { |
| 192 | type description; |
| 193 | description "long description field"; |
| 194 | } |
| 195 | } |
Scott Baker | ee0a68f | 2022-02-07 16:35:43 -0800 | [diff] [blame] | 196 | |
| 197 | typedef ipv4-subnet { |
| 198 | type string { |
| 199 | pattern |
| 200 | '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' |
| 201 | + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' |
| 202 | + '(/([0-9]|[1-2][0-9]|3[0-2]))'; |
| 203 | } |
| 204 | description "IPv4 network in CIDR notation"; |
| 205 | } |
| 206 | |
| 207 | typedef host-or-network { |
| 208 | type union { |
| 209 | type inet:host; |
| 210 | type ipv4-subnet; |
| 211 | } |
| 212 | description "hostname, ip-address, or network"; |
| 213 | } |
Scott Baker | fdbad76 | 2022-01-03 16:00:45 -0800 | [diff] [blame] | 214 | } |
Scott Baker | ee0a68f | 2022-02-07 16:35:43 -0800 | [diff] [blame] | 215 | |