aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/restconfapi-yang/src/main/yang/sotn/ietf-eth-tran-service@2018-03-01.yang
blob: cb7c8f05f48c6b941fb7d5f17901e7085e6e6dd3 (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
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
module ietf-eth-tran-service {

  namespace "urn:ietf:params:xml:ns:yang:ietf-eth-tran-service";

  prefix "ethtsvc";

        import ietf-yang-types {
                prefix "yang";
        }

  import ietf-te-types {
    prefix "te-types";
  }

  import ietf-eth-tran-types {
    prefix "etht-types";
  }

        organization
                "Internet Engineering Task Force (IETF) CCAMP WG";
  contact
    "
      WG List: <mailto:ccamp@ietf.org>
      ID-draft editor:
        Haomian Zheng (zhenghaomian@huawei.com);
        Italo Busi (italo.busi@huawei.com);
        Aihua Guo (aihuaguo@huawei.com);
        Yunbin Xu (xuyunbin@ritt.cn);
        Yang Zhao (zhaoyangyjy@chinamobile.com);
        Xufeng Liu (Xufeng_Liu@jabil.com);
        Giuseppe Fioccola (giuseppe.fioccola@telecomitalia.it);
    ";

  description
    "This module defines a YANG data model for describing
     the Ethernet transport services.";

        revision 2018-03-01 {
                description
                        "Initial revision";
                reference
                        "draft-zheng-ccamp-client-signal-yang";
        }

  /*
  Groupings
  */

  grouping vlan-classification {
    description
      "A grouping which represents classification on an 802.1Q VLAN tag.";

    leaf tag-type {
      type etht-types:eth-tag-classify;
      description
        "The tag type used for VLAN classification.";
    }
    choice individual-bundling-vlan {
      description
        "VLAN based classification can be individual
         or bundling.";
      case individual-vlan {
        leaf vlan-value {
          type etht-types:vlanid;
          description
            "VLAN ID value.";
        }
      }

      case vlan-bundling {
        leaf vlan-range {
          type etht-types:vid-range-type;
          description
            "List of VLAN ID values.";
        }
      }
    }
  }

  grouping vlan-write {
    description
      "A grouping which represents push/pop operations
       of an 802.1Q VLAN tag.";

    leaf tag-type {
      type etht-types:eth-tag-type;
      description
        "The VLAN tag type to push/swap.";
    }
    leaf vlan-value {
      type etht-types:vlanid;
      description
        "The VLAN ID value to push/swap.";
    }
  }

  grouping vlan-operations {
    description
      "A grouping which represents VLAN operations.";

      leaf pop-tags {
      type uint8 {
        range "1..2";
      }
      description
        "The number of VLAN tags to pop (or swap if used in
         conjunction with push-tags)";
    }
    container push-tags {
      description
        "The VLAN tags to push (or swap if used in
         conjunction with pop-tags)";

      container outer-tag {
        presence
          "Indicates existence of the outermost VLAN tag to
           push/swap";

        description
          "The outermost VLAN tag to push/swap.";

        uses vlan-write;
      }
      container second-tag {
        must
                                        '../outer-tag/tag-type = "s-vlan-tag-type" and ' +
                                        'tag-type = "c-vlan-tag-type"'
        {

          error-message
            "
              When pushing/swapping two tags, the outermost tag must
              be specified and of S-VLAN type and the second
              outermost tag must be of C-VLAN tag type.
            ";
          description
            "
              For IEEE 802.1Q interoperability, when pushing/swapping
              two tags, it is required that the outermost tag exists
              and is an S-VLAN, and the second outermost tag is a
              C-VLAN.
            ";
        }

        presence
          "Indicates existence of a second outermost VLAN tag to
           push/swap";

        description
          "The second outermost VLAN tag to push/swap.";

        uses vlan-write;
      }
    }
  }

  grouping bandwidth-profiles {
    description
      "A grouping which represent bandwidth profile configuration.";

    choice direction {
      description
        "Whether the bandwidth profiles are symmetrical or
         asymmetrical";
      case symmetrical {
        description
          "The same bandwidth profile is used to describe the ingress
          and the egress bandwidth profile.";

        leaf ingress-egress-bandwidth-profile-name {
          type "string";
          description
            "Name of the bandwidth profile.";
        }
      }
      case asymmetrical {
        description
          "Ingress and egress bandwidth profiles can be specified.";
        leaf ingress-bandwidth-profile-name {
          type "string";
          description
            "Name of the bandwidth profile used in
             the ingress direction.";
        }
        leaf egress-bandwidth-profile-name {
          type "string";
          description
            "Name of the bandwidth profile used in
             the egress direction.";
        }
      }
    }
  }

  grouping etht-svc-access-parameters {
    description
      "ETH transport services access parameters";

    leaf access-node-id {
      type te-types:te-node-id;
      description
        "The identifier of the access node in
         the ETH transport topology.";
    }
    leaf access-ltp-id {
      type te-types:te-tp-id;
      description
        "The TE link termination point identifier, used
         together with access-node-id to identify the
         access LTP.";
    }
    leaf service-classification-type {
      type identityref {
        base etht-types:service-classification-type;
      }
      description
        "Service classification type.";
    }

    choice service-classification {
      description
        "Access classification can be port-based or
         VLAN based.";

      case port-classification {
        /* no additional information */
      }

      case vlan-classification {
        container outer-tag {
          presence "The outermost VLAN tag exists";
          description
            "Classifies traffic using the outermost VLAN tag.";

          uses vlan-classification;
        }
        container second-tag {
          must
                                                '../outer-tag/tag-type = "classify-s-vlan" and ' +
                                                'tag-type = "classify-c-vlan"'
          {

            error-message
              "
                When matching two tags, the outermost tag must be
                specified and of S-VLAN type and the second
                outermost tag must be of C-VLAN tag type.
              ";
            description
              "
                For IEEE 802.1Q interoperability, when matching two
                tags, it is required that the outermost tag exists
                and is an S-VLAN, and the second outermost tag is a
                C-VLAN.
              ";
          }
          presence "The second outermost VLAN tag exists";

          description
            "Classifies traffic using the second outermost VLAN tag.";

          uses vlan-classification;
        }
      }
    }

/*
        Open issue: can we constraints it to be used only with mp services?
*/
                leaf split-horizon-group {
                        type string;
                        description "Identify a split horizon group";
                }

    uses bandwidth-profiles;

    container vlan-operations {
        description
          "include parameters for vlan-operation";
      choice direction {
        description
          "Whether the VLAN operations are symmetrical or
           asymmetrical";
        case symmetrical {
          container symmetrical-operation {
            uses vlan-operations;
            description
              "Symmetrical operations.
               Expressed in the ingress direction, but
               the reverse operation is applied to egress traffic";
          }
        }
        case asymmetrical {
          container asymmetrical-operation {
            description "Asymmetrical operations";
            container ingress {
              uses vlan-operations;
              description "Ingress operations";
            }
            container egress {
              uses vlan-operations;
              description "Egress operations";
            }
          }
        }
      }
    }
  }

  grouping etht-svc-tunnel-parameters {
    description
      "ETH transport services tunnel parameters";

    leaf tunnel-name {
      type string;
      description
        "TE service tunnel instance name.";
    }
    choice svc-multiplexing-tag {
      description
        "Service multiplexing is optional and flexible.";

      case other {
        /*
         placeholder to support proprietary multiplexing
         (for further discussion)
        */
                        }

      case none {
        /* no additional information is needed */
                        }

      case vlan-tag {
        /*
          No additional information is needed
          The C-Tag or S-Tag used for service mulitplexing is defined
          by the VLAN classification and operations configured in the
          etht-svc-access-parameters grouping
        */
                        }

      case pw {
        /* to be completed (for further discussion) */
                        }
    }

/*
        Open issue: can we constraints it to be used only with mp services?
*/
                leaf src-split-horizon-group {
                        type string;
                        description "Identify a split horizon group at the Tunnel source TTP";
                }
                leaf dst-split-horizon-group {
                        type string;
                        description "Identify a split horizon group at the Tunnel destination TTP";
                }
  }

  grouping te-topology-identifier {
                description
        "An identifier to uniquely identify the TE topology.";
    leaf access-provider-id {
      type te-types:te-global-id;
      description
        "An identifier to uniquely identify a provider.";
    }
    leaf access-client-id {
      type te-types:te-global-id;
      description
        "An identifier to uniquely identify a client.";
    }
    leaf access-topology-id {
      type te-types:te-topology-id;
      description
        "Identifies the topology the
        service access ports belong to.";
    }
  }

        grouping  etht-svc-pm-threshold_config {
                description
                        "Configuraiton parameters for Ethernet service PM thresholds.";

                leaf sending-rate-high {
                        type uint64;
                        description
                                "High threshold of packet sending rate in kbps.";
                }
                leaf sending-rate-low {
                        type uint64;
                        description
                                "Low threshold of packet sending rate in kbps.";
                }
                leaf receiving-rate-high {
                        type uint64;
                        description
                                "High threshold of packet receiving rate in kbps.";
                }
                leaf receiving-rate-low {
                        type uint64;
                        description
                                "Low threshold of packet receiving rate in kbps.";
                }
        }

        grouping  etht-svc-pm-stats {
                description
                        "Ethernet service PM statistics.";

                leaf sending-rate-too-high {
                        type uint32;
                        description
                                "Counter that indicates the number of times the sending rate is above the high threshold";
                }
                leaf sending-rate-too-low {
                        type uint32;
                        description
                                "Counter that indicates the number of times the sending rate is below the low threshold";
                }
                leaf receiving-rate-too-high {
                        type uint32;
                        description
                                "Counter that indicates the number of times the receiving rate is above the high threshold";
                }
                leaf receiving-rate-too-low {
                        type uint32;
                        description
                                "Counter that indicates the number of times the receiving rate is below the low threshold";
                }
        }

  grouping  etht-svc-instance_config {
    description
      "Configuraiton parameters for Ethernet services.";

    leaf etht-svc-name {
      type string;
      description
        "Name of the p2p ETH transport service.";
    }

                leaf etht-svc-descr {
                        type string;
                        description
                                "Description of the ETH transport service.";
                }

                leaf etht-svc-type {
                        type etht-types:service-type;
                        description
                                "Type of Ethernet service (p2p, mp2mp or rmp).";
                        /* Add default as p2p */
                }

                uses te-topology-identifier;

    list etht-svc-access-ports {
      key access-port-id;
      min-elements "1";
/*
        Open Issue:
                Is it possible to limit the max-elements only for p2p services?
                        max-elements "2";
*/
      description
        "List of the ETH trasport services access port instances.";

      leaf access-port-id {
        type uint16;
        description
          "ID of the service access port instance";
      }
        uses etht-svc-access-parameters;
    }
    list etht-svc-tunnels {
      key tunnel-name;
      description
        "List of the TE Tunnels supporting the ETH
        transport service.";

      uses etht-svc-tunnel-parameters;
    }
                container pm-config {
                        description
                                "ETH service performance monitoring";

                        leaf pm-enable {
                                type boolean;
                                description
                                        "Boolean value indicating whether PM is enabled.";
                        }
                        uses etht-svc-pm-threshold_config;
                }
    leaf admin-status {
      type identityref {
        base te-types:tunnel-state-type;
      }
      default te-types:tunnel-state-up;
      description "ETH service administrative state.";
    }
        }

  grouping  etht-svc-instance_state {
    description
      "State parameters for Ethernet services.";

    leaf operational-state {
          type identityref {
        base te-types:tunnel-state-type;
      }
      default te-types:tunnel-state-up;
          description "ETH service operational state.";
    }
    leaf provisioning-state {
      type identityref {
        base te-types:lsp-state-type;
      }
      description "ETH service provisioning state.";
    }
                leaf creation-time {
                        type yang:date-and-time;
                        description
                                "Time of ETH service creation.";
                }
                leaf last-updated-time {
                        type yang:date-and-time;
                        description
                                "Time of ETH service last update.";
                }
                uses etht-svc-pm-stats;
  }

  /*
  Data nodes
  */

  container etht-svc {
    description
      "ETH transport services.";

    container globals {
      description
      "ETH profile information.";
      list etht-svc-bandwidth-profiles {
        key bandwidth-profile-name;
        description
          "List of bandwidth profile templates used by
           Ethernet services.";

        uses etht-types:etht-bandwidth-profiles;
      }
    }

    list etht-svc-instances {
      key etht-svc-name;
      description
        "The list of p2p ETH transport service instances";

      uses etht-svc-instance_config;

      container state {
        config false;
        description
          "Ethernet Service states.";

        uses etht-svc-instance_state;
      }
    }
  }
}