Thomas Vachuska | 8ca75a2 | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | module openconfig-isis-types { |
| 2 | |
| 3 | yang-version "1"; |
| 4 | |
| 5 | // namespace |
| 6 | namespace "http://openconfig.net/yang/isis-types"; |
| 7 | |
| 8 | prefix "oc-isis-types"; |
| 9 | |
| 10 | import openconfig-extensions { prefix oc-ext; } |
| 11 | |
| 12 | // meta |
| 13 | organization "OpenConfig working group"; |
| 14 | |
| 15 | contact |
| 16 | "OpenConfig working group |
| 17 | www.openconfig.net"; |
| 18 | |
| 19 | description |
| 20 | "This module contains general data definitions for use in ISIS YANG |
| 21 | model."; |
| 22 | |
| 23 | oc-ext:openconfig-version "0.3.2"; |
| 24 | |
| 25 | revision "2017-07-26" { |
| 26 | description |
| 27 | "Update LSDB and fix bugs."; |
| 28 | reference "0.3.2"; |
| 29 | } |
| 30 | |
| 31 | revision "2017-05-15" { |
| 32 | description |
| 33 | "Refactor LSDB."; |
| 34 | reference "0.3.0"; |
| 35 | } |
| 36 | |
| 37 | revision "2017-01-13" { |
| 38 | description |
| 39 | "Remove top-level /isis container"; |
| 40 | reference "0.2.1"; |
| 41 | } |
| 42 | |
| 43 | revision "2016-12-15" { |
| 44 | description |
| 45 | "Add segment routing to IS-IS module"; |
| 46 | reference "0.2.0"; |
| 47 | } |
| 48 | |
| 49 | revision "2016-10-18" { |
| 50 | description |
| 51 | "Initial revision of IS-IS models."; |
| 52 | reference "0.1.0"; |
| 53 | } |
| 54 | |
| 55 | // identity statements |
| 56 | identity OVERLOAD_RESET_TRIGGER_TYPE { |
| 57 | description |
| 58 | "Base identify type for triggers that reset Overload Bit"; |
| 59 | } |
| 60 | |
| 61 | identity WAIT_FOR_BGP { |
| 62 | base OVERLOAD_RESET_TRIGGER_TYPE; |
| 63 | description |
| 64 | "Base identity type for resetting Overload Bit when BGP has converged. "; |
| 65 | } |
| 66 | |
| 67 | identity WAIT_FOR_SYSTEM { |
| 68 | base OVERLOAD_RESET_TRIGGER_TYPE; |
| 69 | description |
| 70 | "Base identity type for resetting Overload Bit when system resources have |
| 71 | been restored. "; |
| 72 | } |
| 73 | |
| 74 | identity MT_TYPE { |
| 75 | description |
| 76 | "Base identify type for multi-topology"; |
| 77 | } |
| 78 | |
| 79 | identity SAFI_TYPE { |
| 80 | description |
| 81 | "Base identify type for SAFI"; |
| 82 | } |
| 83 | |
| 84 | identity AFI_TYPE { |
| 85 | description |
| 86 | "Base identify type for AFI"; |
| 87 | } |
| 88 | |
| 89 | identity AFI_SAFI_TYPE { |
| 90 | description |
| 91 | "Base identify type for AFI/SAFI"; |
| 92 | } |
| 93 | |
| 94 | identity IPV4_UNICAST { |
| 95 | base AFI_SAFI_TYPE; |
| 96 | description |
| 97 | "Base identify type for IPv4 Unicast address family"; |
| 98 | } |
| 99 | |
| 100 | identity IPV6_MULTICAST { |
| 101 | base AFI_SAFI_TYPE; |
| 102 | description |
| 103 | "Base identify type for IPv6 multicast address family"; |
| 104 | } |
| 105 | |
| 106 | identity IPV4_MULTICAST { |
| 107 | base AFI_SAFI_TYPE; |
| 108 | description |
| 109 | "Base identify type for IPv4 multicast address family"; |
| 110 | } |
| 111 | |
| 112 | identity IPV6_UNICAST { |
| 113 | base AFI_SAFI_TYPE; |
| 114 | description |
| 115 | "Base identify type for IPv6 unicast address family"; |
| 116 | } |
| 117 | |
| 118 | identity UNICAST { |
| 119 | base SAFI_TYPE; |
| 120 | description |
| 121 | "Base identify type for IPv4 Unicast address family"; |
| 122 | } |
| 123 | |
| 124 | identity MULTICAST { |
| 125 | base SAFI_TYPE; |
| 126 | description |
| 127 | "Base identify type for IPv6 multicast address family"; |
| 128 | } |
| 129 | |
| 130 | identity IPV4 { |
| 131 | base AFI_TYPE; |
| 132 | description |
| 133 | "Base identify type for IPv4 address family"; |
| 134 | } |
| 135 | |
| 136 | identity IPV6 { |
| 137 | base AFI_TYPE; |
| 138 | description |
| 139 | "Base identify type for IPv6 address family"; |
| 140 | } |
| 141 | |
| 142 | // typedef statements |
| 143 | typedef level-type { |
| 144 | type enumeration { |
| 145 | enum LEVEL_1 { |
| 146 | description "This enum describes ISIS level 1"; |
| 147 | } |
| 148 | enum LEVEL_2 { |
| 149 | description "This enum describes ISIS level 2"; |
| 150 | } |
| 151 | enum LEVEL_1_2 { |
| 152 | description "This enum describes ISIS level 1-2"; |
| 153 | } |
| 154 | } |
| 155 | description |
| 156 | "This type defines ISIS level types"; |
| 157 | } |
| 158 | |
| 159 | typedef level-number { |
| 160 | type uint8 { |
| 161 | range "1..2"; |
| 162 | } |
| 163 | description |
| 164 | "This type defines ISIS level."; |
| 165 | } |
| 166 | |
| 167 | typedef adaptive-timer-type { |
| 168 | type enumeration { |
| 169 | enum LINEAR { |
| 170 | description "This enum describes linear algorithm timer"; |
| 171 | } |
| 172 | enum EXPONENTIAL { |
| 173 | description "This enum describes exponential algorithm timer"; |
| 174 | } |
| 175 | } |
| 176 | description |
| 177 | "This type defines ISIS adaptive timer types"; |
| 178 | } |
| 179 | |
| 180 | typedef hello-padding-type { |
| 181 | type enumeration { |
| 182 | enum STRICT { |
| 183 | description "This enum describes strict padding"; |
| 184 | } |
| 185 | enum LOOSE { |
| 186 | description "This enum describes loose padding"; |
| 187 | } |
| 188 | enum ADAPTIVE { |
| 189 | description "This enum describes adaptive padding"; |
| 190 | } |
| 191 | enum DISABLE { |
| 192 | description "This enum disables padding"; |
| 193 | } |
| 194 | } |
| 195 | description |
| 196 | "This type defines ISIS hello padding type"; |
| 197 | } |
| 198 | |
| 199 | typedef circuit-type { |
| 200 | type enumeration { |
| 201 | enum POINT_TO_POINT { |
| 202 | description "This enum describes a point-to-point interface"; |
| 203 | } |
| 204 | enum BROADCAST { |
| 205 | description "This enum describes a broadcast interface"; |
| 206 | } |
| 207 | } |
| 208 | description |
| 209 | "This type defines ISIS interface types "; |
| 210 | } |
| 211 | |
| 212 | typedef metric-type { |
| 213 | type enumeration { |
| 214 | enum INTERNAL { |
| 215 | description "This enum describes internal route type"; |
| 216 | } |
| 217 | enum EXTERNAL { |
| 218 | description "This enum describes external route type"; |
| 219 | } |
| 220 | } |
| 221 | description |
| 222 | "This type defines ISIS metric type"; |
| 223 | } |
| 224 | |
| 225 | typedef wide-metric { |
| 226 | type uint32 { |
| 227 | range "1..16777215"; |
| 228 | } |
| 229 | description |
| 230 | "This type defines ISIS wide metric."; |
| 231 | } |
| 232 | |
| 233 | typedef narrow-metric { |
| 234 | type uint8 { |
| 235 | range "1..63"; |
| 236 | } |
| 237 | description |
| 238 | "This type defines ISIS narrow metric."; |
| 239 | } |
| 240 | |
| 241 | typedef metric-style { |
| 242 | type enumeration { |
| 243 | enum NARROW_METRIC { |
| 244 | description |
| 245 | "This enum describes narrow metric style"; |
| 246 | reference "RFC1195"; |
| 247 | } |
| 248 | enum WIDE_METRIC { |
| 249 | description |
| 250 | "This enum describes wide metric style"; |
| 251 | reference "RFC5305"; |
| 252 | } |
| 253 | } |
| 254 | description |
| 255 | "This type defines ISIS metric styles"; |
| 256 | } |
| 257 | |
| 258 | typedef isis-interface-adj-state { |
| 259 | type enumeration { |
| 260 | enum UP { |
| 261 | description |
| 262 | "This state describes that adjacency is established."; |
| 263 | } |
| 264 | enum DOWN { |
| 265 | description |
| 266 | "This state describes that adjacency is NOT established."; |
| 267 | } |
| 268 | enum INIT { |
| 269 | description |
| 270 | "This state describes that adjacency is establishing."; |
| 271 | } |
| 272 | enum FAILED { |
| 273 | description |
| 274 | "This state describes that adjacency is failed."; |
| 275 | } |
| 276 | } |
| 277 | description |
| 278 | "This type defines the state of the interface."; |
| 279 | } |
| 280 | |
| 281 | typedef net { |
| 282 | type string { |
| 283 | pattern '^[a-fA-F0-9]{2}(\.[a-fA-F0-9]{4}){3,9}\.[a-fA-F0-9]{2}$'; |
| 284 | } |
| 285 | description |
| 286 | "This type defines OSI NET address. A NET should should be in |
| 287 | the form xx.yyyy.yyyy.yyyy.00 with up to 9 sets of yyyy."; |
| 288 | } |
| 289 | |
| 290 | typedef area-address { |
| 291 | type string { |
| 292 | pattern '^[0-9A-Fa-f]{2}\.([0-9A-Fa-f]{4}\.){0,3}$'; |
| 293 | } |
| 294 | description |
| 295 | "This type defines the ISIS area address."; |
| 296 | } |
| 297 | |
| 298 | typedef system-id { |
| 299 | type string { |
| 300 | pattern '^[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}$'; |
| 301 | } |
| 302 | description |
| 303 | "This type defines ISIS system id using pattern, system id looks |
| 304 | like : 0143.0438.AeF0"; |
| 305 | } |
| 306 | |
| 307 | typedef extended-circuit-id { |
| 308 | type uint32; |
| 309 | description |
| 310 | "This type defines interface circuit ID."; |
| 311 | } |
| 312 | |
| 313 | typedef lsp-id { |
| 314 | type string { |
| 315 | pattern |
| 316 | '^[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]' |
| 317 | + '{4}\.[0-9][0-9]-[0-9][0-9]$'; |
| 318 | } |
| 319 | description |
| 320 | "This type defines ISIS LSP ID. ISIS LSP ID type should be in |
| 321 | the form of xxxx.xxxx.xxxx.xx-xx"; |
| 322 | } |
| 323 | typedef snpa { |
| 324 | type string { |
| 325 | length "0 .. 20"; |
| 326 | } |
| 327 | description |
| 328 | "This type defines Subnetwork Point of Attachment format."; |
| 329 | } |
| 330 | } |