Thomas Vachuska | 8ca75a2 | 2017-08-24 16:12:59 -0700 | [diff] [blame] | 1 | module openconfig-mpls-types { |
| 2 | |
| 3 | yang-version "1"; |
| 4 | |
| 5 | // namespace |
| 6 | namespace "http://openconfig.net/yang/mpls-types"; |
| 7 | |
| 8 | prefix "oc-mpls-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 | netopenconfig@googlegroups.com"; |
| 18 | |
| 19 | description |
| 20 | "General types for MPLS / TE data model"; |
| 21 | |
| 22 | oc-ext:openconfig-version "2.4.0"; |
| 23 | |
| 24 | revision "2017-06-21" { |
| 25 | description |
| 26 | "Add TC bits typedef."; |
| 27 | reference "2.4.0"; |
| 28 | } |
| 29 | |
| 30 | revision "2017-03-22" { |
| 31 | description |
| 32 | "Add RSVP calculated-absolute-subscription-bw"; |
| 33 | reference "2.3.0"; |
| 34 | } |
| 35 | |
| 36 | revision "2017-01-26" { |
| 37 | description |
| 38 | "Add RSVP Tspec, clarify units for RSVP, remove unused LDP"; |
| 39 | reference "2.2.0"; |
| 40 | } |
| 41 | |
| 42 | revision "2016-12-15" { |
| 43 | description |
| 44 | "Add additional MPLS parameters"; |
| 45 | reference "2.1.0"; |
| 46 | } |
| 47 | |
| 48 | revision "2016-09-01" { |
| 49 | description |
| 50 | "Revisions based on implementation feedback"; |
| 51 | reference "2.0.0"; |
| 52 | } |
| 53 | |
| 54 | revision "2016-08-08" { |
| 55 | description |
| 56 | "Public release of MPLS models"; |
| 57 | reference "1.0.1"; |
| 58 | } |
| 59 | |
| 60 | // identity statements |
| 61 | |
| 62 | identity PATH_COMPUTATION_METHOD { |
| 63 | description |
| 64 | "base identity for supported path computation |
| 65 | mechanisms"; |
| 66 | } |
| 67 | |
| 68 | identity LOCALLY_COMPUTED { |
| 69 | base PATH_COMPUTATION_METHOD; |
| 70 | description |
| 71 | "indicates a constrained-path LSP in which the |
| 72 | path is computed by the local LER"; |
| 73 | } |
| 74 | |
| 75 | identity EXTERNALLY_QUERIED { |
| 76 | base PATH_COMPUTATION_METHOD; |
| 77 | description |
| 78 | "Constrained-path LSP in which the path is |
| 79 | obtained by querying an external source, such as a PCE server. |
| 80 | In the case that an LSP is defined to be externally queried, it may |
| 81 | also have associated explicit definitions (which are provided to the |
| 82 | external source to aid computation); and the path that is returned by |
| 83 | the external source is not required to provide a wholly resolved |
| 84 | path back to the originating system - that is to say, some local |
| 85 | computation may also be required"; |
| 86 | } |
| 87 | |
| 88 | identity EXPLICITLY_DEFINED { |
| 89 | base PATH_COMPUTATION_METHOD; |
| 90 | description |
| 91 | "constrained-path LSP in which the path is |
| 92 | explicitly specified as a collection of strict or/and loose |
| 93 | hops"; |
| 94 | } |
| 95 | |
| 96 | |
| 97 | // using identities rather than enum types to simplify adding new |
| 98 | // signaling protocols as they are introduced and supported |
| 99 | identity PATH_SETUP_PROTOCOL { |
| 100 | description |
| 101 | "base identity for supported MPLS signaling |
| 102 | protocols"; |
| 103 | } |
| 104 | |
| 105 | identity PATH_SETUP_RSVP { |
| 106 | base PATH_SETUP_PROTOCOL; |
| 107 | description |
| 108 | "RSVP-TE signaling protocol"; |
| 109 | } |
| 110 | |
| 111 | identity PATH_SETUP_SR { |
| 112 | base PATH_SETUP_PROTOCOL; |
| 113 | description |
| 114 | "Segment routing"; |
| 115 | } |
| 116 | |
| 117 | identity PATH_SETUP_LDP { |
| 118 | base PATH_SETUP_PROTOCOL; |
| 119 | description |
| 120 | "LDP - RFC 5036"; |
| 121 | } |
| 122 | |
| 123 | |
| 124 | identity PROTECTION_TYPE { |
| 125 | description |
| 126 | "base identity for protection type"; |
| 127 | } |
| 128 | |
| 129 | identity UNPROTECTED { |
| 130 | base PROTECTION_TYPE; |
| 131 | description |
| 132 | "no protection is desired"; |
| 133 | } |
| 134 | |
| 135 | identity LINK_PROTECTION_REQUIRED { |
| 136 | base PROTECTION_TYPE; |
| 137 | description |
| 138 | "link protection is desired"; |
| 139 | } |
| 140 | |
| 141 | identity LINK_NODE_PROTECTION_REQUESTED { |
| 142 | base PROTECTION_TYPE; |
| 143 | description |
| 144 | "node and link protection are both desired"; |
| 145 | } |
| 146 | |
| 147 | identity LSP_ROLE { |
| 148 | description |
| 149 | "Base identity for describing the role of |
| 150 | label switched path at the current node"; |
| 151 | } |
| 152 | |
| 153 | identity INGRESS { |
| 154 | base LSP_ROLE; |
| 155 | description |
| 156 | "Label switched path is an ingress (headend) |
| 157 | LSP"; |
| 158 | } |
| 159 | |
| 160 | identity EGRESS { |
| 161 | base LSP_ROLE; |
| 162 | description |
| 163 | "Label switched path is an egress (tailend) |
| 164 | LSP"; |
| 165 | } |
| 166 | |
| 167 | identity TRANSIT { |
| 168 | base LSP_ROLE; |
| 169 | description |
| 170 | "Label switched path is a transit LSP"; |
| 171 | } |
| 172 | |
| 173 | |
| 174 | identity TUNNEL_TYPE { |
| 175 | description |
| 176 | "Base identity from which specific tunnel types are |
| 177 | derived."; |
| 178 | } |
| 179 | |
| 180 | identity P2P { |
| 181 | base TUNNEL_TYPE; |
| 182 | description |
| 183 | "TE point-to-point tunnel type."; |
| 184 | } |
| 185 | |
| 186 | identity P2MP { |
| 187 | base TUNNEL_TYPE; |
| 188 | description |
| 189 | "TE point-to-multipoint tunnel type."; |
| 190 | } |
| 191 | |
| 192 | |
| 193 | identity LSP_OPER_STATUS { |
| 194 | description |
| 195 | "Base identity for LSP operational status"; |
| 196 | } |
| 197 | |
| 198 | identity DOWN { |
| 199 | base LSP_OPER_STATUS; |
| 200 | description |
| 201 | "LSP is operationally down or out of service"; |
| 202 | } |
| 203 | |
| 204 | identity UP { |
| 205 | base LSP_OPER_STATUS; |
| 206 | description |
| 207 | "LSP is operationally active and available |
| 208 | for traffic."; |
| 209 | } |
| 210 | |
| 211 | identity TUNNEL_ADMIN_STATUS { |
| 212 | description |
| 213 | "Base identity for tunnel administrative status"; |
| 214 | } |
| 215 | |
| 216 | identity ADMIN_DOWN { |
| 217 | base TUNNEL_ADMIN_STATUS; |
| 218 | description |
| 219 | "LSP is administratively down"; |
| 220 | } |
| 221 | |
| 222 | identity ADMIN_UP { |
| 223 | base TUNNEL_ADMIN_STATUS; |
| 224 | description |
| 225 | "LSP is administratively up"; |
| 226 | } |
| 227 | |
| 228 | identity NULL_LABEL_TYPE { |
| 229 | description |
| 230 | "Base identity from which specific null-label types are |
| 231 | derived."; |
| 232 | } |
| 233 | |
| 234 | identity EXPLICIT { |
| 235 | base NULL_LABEL_TYPE; |
| 236 | description |
| 237 | "Explicit null label is used."; |
| 238 | } |
| 239 | |
| 240 | identity IMPLICIT { |
| 241 | base NULL_LABEL_TYPE; |
| 242 | description |
| 243 | "Implicit null label is used."; |
| 244 | } |
| 245 | |
| 246 | identity LSP_METRIC_TYPE { |
| 247 | description |
| 248 | "Base identity for types of LSP metric specification"; |
| 249 | } |
| 250 | |
| 251 | identity LSP_METRIC_RELATIVE { |
| 252 | base LSP_METRIC_TYPE; |
| 253 | description |
| 254 | "The metric specified for the LSPs to which this identity refers |
| 255 | is specified as a relative value to the IGP metric cost to the |
| 256 | LSP's tail-end."; |
| 257 | } |
| 258 | |
| 259 | identity LSP_METRIC_ABSOLUTE { |
| 260 | base LSP_METRIC_TYPE; |
| 261 | description |
| 262 | "The metric specified for the LSPs to which this identity refers |
| 263 | is specified as an absolute value"; |
| 264 | } |
| 265 | |
| 266 | identity LSP_METRIC_INHERITED { |
| 267 | base LSP_METRIC_TYPE; |
| 268 | description |
| 269 | "The metric for for the LSPs to which this identity refers is |
| 270 | not specified explicitly - but rather inherited from the IGP |
| 271 | cost directly"; |
| 272 | } |
| 273 | |
| 274 | // typedef statements |
| 275 | typedef mpls-label { |
| 276 | type union { |
| 277 | type uint32 { |
| 278 | range 16..1048575; |
| 279 | } |
| 280 | type enumeration { |
| 281 | enum IPV4_EXPLICIT_NULL { |
| 282 | value 0; |
| 283 | description |
| 284 | "valid at the bottom of the label stack, |
| 285 | indicates that stack must be popped and packet forwarded |
| 286 | based on IPv4 header"; |
| 287 | } |
| 288 | enum ROUTER_ALERT { |
| 289 | value 1; |
| 290 | description |
| 291 | "allowed anywhere in the label stack except |
| 292 | the bottom, local router delivers packet to the local CPU |
| 293 | when this label is at the top of the stack"; |
| 294 | } |
| 295 | enum IPV6_EXPLICIT_NULL { |
| 296 | value 2; |
| 297 | description |
| 298 | "valid at the bottom of the label stack, |
| 299 | indicates that stack must be popped and packet forwarded |
| 300 | based on IPv6 header"; |
| 301 | } |
| 302 | enum IMPLICIT_NULL { |
| 303 | value 3; |
| 304 | description |
| 305 | "assigned by local LSR but not carried in |
| 306 | packets"; |
| 307 | } |
| 308 | enum ENTROPY_LABEL_INDICATOR { |
| 309 | value 7; |
| 310 | description |
| 311 | "Entropy label indicator, to allow an LSR |
| 312 | to distinguish between entropy label and applicaiton |
| 313 | labels RFC 6790"; |
| 314 | } |
| 315 | enum NO_LABEL { |
| 316 | description |
| 317 | "This value is utilised to indicate that the packet that |
| 318 | is forwarded by the local system does not have an MPLS |
| 319 | header applied to it. Typically, this is used at the |
| 320 | egress of an LSP"; |
| 321 | } |
| 322 | } |
| 323 | } |
| 324 | description |
| 325 | "type for MPLS label value encoding"; |
| 326 | reference "RFC 3032 - MPLS Label Stack Encoding"; |
| 327 | } |
| 328 | |
| 329 | typedef tunnel-type { |
| 330 | type enumeration { |
| 331 | enum P2P { |
| 332 | description |
| 333 | "point-to-point label-switched-path"; |
| 334 | } |
| 335 | enum P2MP { |
| 336 | description |
| 337 | "point-to-multipoint label-switched-path"; |
| 338 | } |
| 339 | enum MP2MP { |
| 340 | description |
| 341 | "multipoint-to-multipoint label-switched-path"; |
| 342 | } |
| 343 | } |
| 344 | description |
| 345 | "defines the tunnel type for the LSP"; |
| 346 | reference |
| 347 | "RFC 6388 - Label Distribution Protocol Extensions for |
| 348 | Point-to-Multipoint and Multipoint-to-Multipoint Label Switched |
| 349 | Paths |
| 350 | RFC 4875 - Extensions to Resource Reservation Protocol |
| 351 | - Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE |
| 352 | Label Switched Paths (LSPs)"; |
| 353 | } |
| 354 | |
| 355 | typedef bandwidth-kbps { |
| 356 | type uint64; |
| 357 | units "Kbps"; |
| 358 | description |
| 359 | "Bandwidth values expressed in kilobits per second"; |
| 360 | } |
| 361 | |
| 362 | typedef bandwidth-mbps { |
| 363 | type uint64; |
| 364 | units "Mbps"; |
| 365 | description |
| 366 | "Bandwidth values expressed in megabits per second"; |
| 367 | } |
| 368 | |
| 369 | typedef bandwidth-gbps { |
| 370 | type uint64; |
| 371 | units "Gbps"; |
| 372 | description |
| 373 | "Bandwidth values expressed in gigabits per second"; |
| 374 | } |
| 375 | |
| 376 | typedef mpls-tc { |
| 377 | type uint8 { |
| 378 | range "0..7"; |
| 379 | } |
| 380 | description |
| 381 | "Values of the MPLS Traffic Class (formerly known as |
| 382 | Experimental, EXP) bits"; |
| 383 | } |
| 384 | |
| 385 | // grouping statements |
| 386 | |
| 387 | // data definition statements |
| 388 | |
| 389 | // augment statements |
| 390 | |
| 391 | // rpc statements |
| 392 | |
| 393 | // notification statements |
| 394 | |
| 395 | } |