summaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-mpls-types.yang
blob: 18d38164d2069f414a36d85e08ddec5dd3c1ac3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
module openconfig-mpls-types {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/mpls-types";

  prefix "oc-mpls-types";

  import openconfig-extensions { prefix oc-ext; }

  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    netopenconfig@googlegroups.com";

  description
    "General types for MPLS / TE data model";

  oc-ext:openconfig-version "3.0.0";

  revision "2018-07-02" {
    description
      "Add new RSVP-TE statistics, remove associated-rsvp-session
      leaf. Remove use of date-and-time.";
    reference "3.0.0";
  }

  revision "2018-06-16" {
    description
      "Included attributes for base LDP configuration.";
     reference "2.6.0";
  }

  revision "2018-06-13" {
    description
      "Add ttl-propagation to global MPLS config";
    reference "2.5.0";
  }

  revision "2018-06-05" {
    description
      "Fixed bugs in when statements on RSVP-TE attributes";
    reference "2.4.2";
  }

  revision "2017-08-24" {
    description
      "Minor formatting fixes.";
    reference "2.4.1";
  }

  revision "2017-06-21" {
    description
      "Add TC bits typedef.";
    reference "2.4.0";
  }

  revision "2017-03-22" {
    description
      "Add RSVP calculated-absolute-subscription-bw";
    reference "2.3.0";
  }

  revision "2017-01-26" {
    description
      "Add RSVP Tspec, clarify units for RSVP, remove unused LDP";
    reference "2.2.0";
  }

  revision "2016-12-15" {
    description
      "Add additional MPLS parameters";
    reference "2.1.0";
  }

  revision "2016-09-01" {
    description
      "Revisions based on implementation feedback";
    reference "2.0.0";
  }

  revision "2016-08-08" {
    description
      "Public release of MPLS models";
    reference "1.0.1";
  }

  // identity statements

  identity PATH_COMPUTATION_METHOD {
    description
     "base identity for supported path computation
      mechanisms";
  }

  identity LOCALLY_COMPUTED {
    base PATH_COMPUTATION_METHOD;
    description
      "indicates a constrained-path LSP in which the
      path is computed by the local LER";
  }

  identity EXTERNALLY_QUERIED {
    base PATH_COMPUTATION_METHOD;
    description
     "Constrained-path LSP in which the path is
      obtained by querying an external source, such as a PCE server.
      In the case that an LSP is defined to be externally queried, it may
      also have associated explicit definitions (which are provided to the
      external source to aid computation); and the path that is returned by
      the external source is not required to provide a wholly resolved
      path back to the originating system - that is to say, some local
      computation may also be required";
  }

  identity EXPLICITLY_DEFINED {
    base PATH_COMPUTATION_METHOD;
    description
     "constrained-path LSP in which the path is
      explicitly specified as a collection of strict or/and loose
      hops";
  }


  // using identities rather than enum types to simplify adding new
  // signaling protocols as they are introduced and supported
  identity PATH_SETUP_PROTOCOL {
    description
      "base identity for supported MPLS signaling
      protocols";
  }

  identity PATH_SETUP_RSVP {
    base PATH_SETUP_PROTOCOL;
    description
      "RSVP-TE signaling protocol";
  }

  identity PATH_SETUP_SR {
    base PATH_SETUP_PROTOCOL;
    description
      "Segment routing";
  }

  identity PATH_SETUP_LDP {
    base PATH_SETUP_PROTOCOL;
    description
      "LDP - RFC 5036";
  }


  identity PROTECTION_TYPE {
    description
      "base identity for protection type";
  }

  identity UNPROTECTED {
    base PROTECTION_TYPE;
    description
      "no protection is desired";
  }

  identity LINK_PROTECTION_REQUIRED {
    base PROTECTION_TYPE;
    description
      "link protection is desired";
  }

  identity LINK_NODE_PROTECTION_REQUESTED {
    base PROTECTION_TYPE;
    description
      "node and link protection are both desired";
  }

  identity LSP_ROLE {
    description
      "Base identity for describing the role of
       label switched path at the current node";
  }

  identity INGRESS {
    base LSP_ROLE;
    description
      "Label switched path is an ingress (headend)
       LSP";
  }

  identity EGRESS {
    base LSP_ROLE;
    description
      "Label switched path is an egress (tailend)
       LSP";
  }

  identity TRANSIT {
    base LSP_ROLE;
    description
      "Label switched path is a transit LSP";
  }


  identity TUNNEL_TYPE {
    description
      "Base identity from which specific tunnel types are
      derived.";
  }

  identity P2P {
    base TUNNEL_TYPE;
    description
      "TE point-to-point tunnel type.";
  }

  identity P2MP {
    base TUNNEL_TYPE;
    description
      "TE point-to-multipoint tunnel type.";
  }


  identity LSP_OPER_STATUS {
    description
      "Base identity for LSP operational status";
  }

  identity DOWN {
    base LSP_OPER_STATUS;
    description
      "LSP is operationally down or out of service";
  }

  identity UP {
    base LSP_OPER_STATUS;
    description
      "LSP is operationally active and available
       for traffic.";
  }

  identity TUNNEL_ADMIN_STATUS {
    description
      "Base identity for tunnel administrative status";
  }

  identity ADMIN_DOWN {
    base TUNNEL_ADMIN_STATUS;
    description
      "LSP is administratively down";
  }

  identity ADMIN_UP {
    base TUNNEL_ADMIN_STATUS;
    description
      "LSP is administratively up";
  }

 identity NULL_LABEL_TYPE {
    description
      "Base identity from which specific null-label types are
      derived.";
  }

  identity EXPLICIT {
    base NULL_LABEL_TYPE;
    description
      "Explicit null label is used.";
  }

  identity IMPLICIT {
    base NULL_LABEL_TYPE;
    description
      "Implicit null label is used.";
  }

  identity LSP_METRIC_TYPE {
    description
      "Base identity for types of LSP metric specification";
  }

  identity LSP_METRIC_RELATIVE {
    base LSP_METRIC_TYPE;
    description
      "The metric specified for the LSPs to which this identity refers
      is specified as a relative value to the IGP metric cost to the
      LSP's tail-end.";
  }

  identity LSP_METRIC_ABSOLUTE {
    base LSP_METRIC_TYPE;
    description
      "The metric specified for the LSPs to which this identity refers
      is specified as an absolute value";
  }

  identity LSP_METRIC_INHERITED {
    base LSP_METRIC_TYPE;
    description
      "The metric for for the LSPs to which this identity refers is
      not specified explicitly - but rather inherited from the IGP
      cost directly";
  }

  // typedef statements
  typedef mpls-label {
    type union {
      type uint32 {
        range 16..1048575;
      }
      type enumeration {
        enum IPV4_EXPLICIT_NULL {
          value 0;
          description
            "valid at the bottom of the label stack,
            indicates that stack must be popped and packet forwarded
            based on IPv4 header";
        }
        enum ROUTER_ALERT {
          value 1;
          description
            "allowed anywhere in the label stack except
            the bottom, local router delivers packet to the local CPU
            when this label is at the top of the stack";
        }
        enum IPV6_EXPLICIT_NULL {
          value 2;
          description
            "valid at the bottom of the label stack,
            indicates that stack must be popped and packet forwarded
            based on IPv6 header";
        }
        enum IMPLICIT_NULL {
          value 3;
          description
            "assigned by local LSR but not carried in
            packets";
        }
        enum ENTROPY_LABEL_INDICATOR {
          value 7;
          description
            "Entropy label indicator, to allow an LSR
            to distinguish between entropy label and applicaiton
            labels RFC 6790";
        }
        enum NO_LABEL {
          description
            "This value is utilised to indicate that the packet that
            is forwarded by the local system does not have an MPLS
            header applied to it. Typically, this is used at the
            egress of an LSP";
        }
      }
    }
    description
      "type for MPLS label value encoding";
    reference "RFC 3032 - MPLS Label Stack Encoding";
  }

  typedef tunnel-type {
    type enumeration {
      enum P2P {
        description
          "point-to-point label-switched-path";
      }
      enum P2MP {
        description
          "point-to-multipoint label-switched-path";
      }
      enum MP2MP {
        description
          "multipoint-to-multipoint label-switched-path";
      }
    }
    description
      "defines the tunnel type for the LSP";
    reference
      "RFC 6388 - Label Distribution Protocol Extensions for
      Point-to-Multipoint and Multipoint-to-Multipoint Label Switched
      Paths
      RFC 4875 - Extensions to  Resource Reservation Protocol
      - Traffic Engineering (RSVP-TE) for Point-to-Multipoint TE
      Label Switched Paths (LSPs)";
  }

  typedef bandwidth-kbps {
    type uint64;
    units "Kbps";
    description
      "Bandwidth values expressed in kilobits per second";
  }

  typedef bandwidth-mbps {
    type uint64;
    units "Mbps";
    description
      "Bandwidth values expressed in megabits per second";
  }

  typedef bandwidth-gbps {
    type uint64;
    units "Gbps";
    description
      "Bandwidth values expressed in gigabits per second";
  }

  typedef mpls-tc {
    type uint8 {
      range "0..7";
    }
    description
      "Values of the MPLS Traffic Class (formerly known as
      Experimental, EXP) bits";
  }

  // grouping statements

  // data definition statements

  // augment statements

  // rpc statements

  // notification statements

}