summaryrefslogtreecommitdiffstats
path: root/actn-interface-tools/actn-model/src/main/yang/ietf-eth-tran-service@2021-01-11.yang
blob: a68de5f51f007f2bb7e398141514a6e5a05047c2 (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
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
module ietf-eth-tran-service {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-eth-tran-service";

  prefix "ethtsvc";
  import ietf-yang-types {
    prefix "yang";
    //reference "RFC 6991 - Common YANG Data Types";
  }

  import ietf-te-types {
    prefix "te-types";
    //reference "RFC 8776 - Traffic Engineering Common YANG Types";
  }

  import ietf-eth-tran-types {
    prefix "etht-types";
    //reference "RFC XXXX - A YANG Data Model for Transport
     //          Network Client Signals";
  }

  import ietf-routing-types {
    prefix "rt-types";
    //reference "RFC 8294 - Common YANG Data Types for the
     //          Routing Area";

  }

  import ietf-te {
    prefix "te";
    //reference "RFC YYYY - A YANG Data Model for Traffic
      //         Engineering Tunnels and Interfaces";
  }

  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.ietf@gmail.com);
        Anton Snitser (antons@sedonasys.com);0
        Francesco Lazzeri (francesco.lazzeri@ericsson.com);
        Yunbin Xu (xuyunbin@caict.ac.cn);
        Yang Zhao (zhaoyangyjy@chinamobile.com);
        Xufeng Liu (xufeng.liu.ietf@gmail.com);
        Giuseppe Fioccola (giuseppe.fioccola@huawei.com);
    ";

  description
    "This module defines a YANG data model for describing
     the Ethernet services. The model fully conforms to the
     Network Management Datastore Architecture (NMDA).

     Copyright (c) 2021 IETF Trust and the persons
     identified as authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).
     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

  revision 2021-01-11 {
    description
      "version -04 as an WG document";
    reference
      "draft-ietf-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.";
    }
/*
 * To be added: this attribute is used when:
 * a) the ETH service has only one CoS (as in current version)
 * b) as a default when a mapping between a given CoS value
 *    and the PCP value is not defined (in future versions)
 */
    leaf default-pcp {
      type uint8 {
        range "0..7";
      }
      description
        "The default Priority Code Point (PCP) 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 = "etht-types:s-vlan-tag-type" and ' +
        'tag-type = "etht-types: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 named-or-value-bandwidth-profile {
    description
      "A grouping to configure a bandwdith profile either by
       referencing a named bandwidth profile or by
       configuring the values of the bandwidth profile attributes.";
    choice style {
      description
        "Whether the bandwidth profile is named or defined by value";

      case named {
        description
          "Named bandwidth profile.";
        leaf bandwidth-profile-name {
          type leafref {
             path "/ethtsvc:etht-svc/ethtsvc:globals/"
             + "ethtsvc:named-bandwidth-profiles/"
             + "ethtsvc:bandwidth-profile-name";
             }
          description
            "Name of the bandwidth profile.";
        }
      }
      case value {
        description
          "Bandwidth profile configured by value.";
        uses etht-types:etht-bandwidth-profiles;
      }
    }
  }

  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 both
           the ingress and the egress bandwidth profile.";
        container ingress-egress-bandwidth-profile {
          description
            "The bandwdith profile used in both directions.";
          uses named-or-value-bandwidth-profile;
        }
      }
      case asymmetrical {
        description
          "Ingress and egress bandwidth profiles can be specified.";
        container ingress-bandwidth-profile {
          description
            "The bandwdith profile used in the ingress direction.";
          uses named-or-value-bandwidth-profile;
        }
        container egress-bandwidth-profile {
          description
            "The bandwdith profile used in the egress direction.";
          uses named-or-value-bandwidth-profile;
        }
      }
    }
  }

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

    leaf access-node-id {
      type te-types:te-node-id;
      description
        "The identifier of the access node in
         the ETH 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 access-role {
      type identityref {
        base etht-types:access-role;
      }
      description
        "Indicate the role of access, e.g., working or protection. ";
    }

    container pm-config {
      uses pm-config-grouping;
      description
      "This grouping is used to set the threshold value for
      performance monitoring. ";
    }

    container state {
      config false;
      description
      "The state is used to monitor the status of service. ";
      leaf operational-state {
        type identityref {
          base te-types:tunnel-state-type;
        }
        description
        "Indicating the operational state of client signal. ";
      }
      leaf provisioning-state {
        type identityref {
          base te-types:lsp-state-type;
        }
        description
        "Indicating the provisional state of client signal,
        especially when there is a change, i.e., revise, create. ";
      }
    }

    leaf performance {
      type identityref {
        base etht-types:performance;
      }
      config false;
      description
        "Performance Monitoring for the service. ";
    }

  }

  grouping etht-svc-tunnel-parameters {
    description
      "ETH services tunnel parameters.";
    choice technology {
      description
        "Service multiplexing is optional and flexible.";

      case native-ethernet {
        /*
         placeholder to support proprietary multiplexing
         (for further discussion)
        */
        list eth-tunnels {
          key name;
          description
            "ETH Tunnel list in native Ethernet scenario.";
          uses tunnels-grouping;
        }
      }

      case frame-base {
        list otn-tunnels {
          key name;
          description
            "OTN Tunnel list in Frame-based scenario.";
          uses tunnels-grouping;
        }
      }

      case mpls-tp {
        container pw {
          description
            "Pseudowire information for Ethernet over MPLS-TP.";
          uses pw-segment-grouping;
        }
      }
    }

/*
 * 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  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 ETH service.";
    }

    leaf etht-svc-title {
      type string;
      description
        "The Identifier of the ETH service.";
    }

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

    leaf etht-svc-customer {
      type string;
      description
        "Customer of the ETH service.";
    }

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

     leaf etht-svc-lifecycle {
      type etht-types:lifecycle-status;
      description
        "Lifecycle state of ETH service.";
      /* Add default as installed  */
    }
    uses te-types:te-topology-identifier;

    uses resilience-grouping;
    list etht-svc-end-points {
      key etht-svc-end-point-name;
      description
        "The logical end point for the ETH service. ";
      uses etht-svc-end-point-grouping;
    }

    container underlay {
      description
        "The unterlay tunnel information that carrying the
        ETH service. ";
      uses etht-svc-tunnel-parameters;
    }

    leaf admin-status {
      type identityref {
        base te-types:tunnel-admin-state-type;
      }
      default te-types:tunnel-admin-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.";
    }

    leaf created-by {
       type string;
       description
         "The client signal is created by whom,
          can be a system or staff ID.";
     }
     leaf last-updated-by {
       type string;
       description
         "The client signal is last updated by whom,
          can be a system or staff ID.";
     }
     leaf owned-by {
       type string;
       description
         "The client signal is last updated by whom,
          can be a system ID.";
     }
  }

  /*
   * Data nodes
   */

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

    container globals {
      description
        "Globals Ethernet configuration data container";
      list named-bandwidth-profiles {
        key bandwidth-profile-name;
        description
          "List of named bandwidth profiles used by
           Ethernet services.";

        leaf bandwidth-profile-name {
          type string;
          description
            "Name of the bandwidth profile.";
        }
        uses etht-types:etht-bandwidth-profiles;
      }
    }

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

      uses etht-svc-instance-config;

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

        uses etht-svc-instance-state;
      }
    }
  }

  grouping resilience-grouping {
    description
      "Grouping for resilience configuration. ";
    container resilience {
    description
      "To configure the data plane protection parameters,
      currently a placeholder only, future candidate attributes
      include, Revert, WTR, Hold-off Timer, ...";
      uses te:protection-restoration-properties;
    }
  }

  grouping etht-svc-end-point-grouping {
    description
      "Grouping for the end point configuration.";
    leaf etht-svc-end-point-name {
      type string;
      description
      "The name of the logical end point of ETH service. ";
    }

    leaf etht-svc-end-point-id {
      type string;
      description
      "The identifier of the logical end point of ETH service.";
    }

    leaf etht-svc-end-point-descr {
      type string;
      description
      "The description of the logical end point of ETH service. ";
    }

    leaf topology-role {
      type identityref {
        base etht-types:topology-role;
      }
      description
      "Indicating the underlay topology role,
      e.g., hub,spoke, any-to-any ";
    }

    container resilience {
      description
      "Placeholder for resilience configuration, for future study. ";
    }

    list etht-svc-access-points {
      key access-point-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 point instances.";

      leaf access-point-id {
        type string;
        description
          "ID of the service access point instance";
      }
      uses etht-svc-access-parameters;
    }

    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 = "etht-types:classify-s-vlan" and ' +
            'tag-type = "etht-types: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
        "Configuration of VLAN operations.";
      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 pm-config-grouping {
    description
      "Grouping used for Performance Monitoring Configuration. ";
    leaf pm-enable {
      type boolean;
      description
      "Whether to enable the performance monitoring.";
    }

    leaf sending-rate-high {
      type uint64;
      description
      "The upperbound of sending rate.";
    }

    leaf sending-rate-low {
      type uint64;
      description
      "The lowerbound of sending rate.";
    }

    leaf receiving-rate-high {
      type uint64;
      description
      "The upperbound of receiving rate.";
    }

    leaf receiving-rate-low {
      type uint64;
      description
      "The lowerbound of receiving rate.";
    }
  }

  grouping pw-segment-grouping {
    description
      "Grouping used for PW configuration. ";
    leaf pw-id {
      type string;
      description
      "The Identifier information of pseudowire. ";
    }

    leaf pw-name {
      type string;
      description
      "The name information of pseudowire.";
    }

    leaf transmit-label {
      type rt-types:mpls-label;
      description
      "Transmit label information in PW. ";
    }

    leaf receive-label {
      type rt-types:mpls-label;
      description
      "Receive label information in PW. ";
    }

    leaf encapsulation-type {
      type identityref {
        base etht-types:encapsulation-type;
      }
      description
        "The encapsulation type, raw or tag. ";
    }

    leaf oper-status {
      type identityref {
        base te-types:tunnel-state-type;
      }
      config false;
      description
        "The operational state of the PW segment. ";
    }

    container ingress-bandwidth-profile {
      description
        "Bandwidth Profile for ingress. ";
      uses pw-segment-named-or-value-bandwidth-profile;
    }

    list pw-paths {
      key path-id;
      description
        "A list of pw paths. ";

      leaf path-id {
        type uint8;
        description
          "The identifier of pw paths. ";

      }

      list tp-tunnels {
        key name;
        description
          "Names of TP Tunnel underlay";
        leaf name {
          type string;
          description
            "Names of TP Tunnel underlay";
          }
      }
    }

  }

  grouping pw-segment-named-or-value-bandwidth-profile {
    description
      "A grouping to configure a bandwdith profile either by
       referencing a named bandwidth profile or by
       configuring the values of the bandwidth profile attributes.";
    choice style {
      description
        "Whether the bandwidth profile is named or defined by value";
      case named {
        description
          "Named bandwidth profile.";
        leaf bandwidth-profile-name {
          type leafref {
            path "/ethtsvc:etht-svc/ethtsvc:globals/"
            + "ethtsvc:named-bandwidth-profiles/"
            + "ethtsvc:bandwidth-profile-name";
          }
          description
            "Name of the bandwidth profile.";
        }
      }
      case value {
        description
          "Bandwidth profile configured by value.";
        uses etht-types:pw-segement-bandwidth-profile-grouping;
      }
    }
  }

  grouping tunnels-grouping {
    description
      "A group of tunnels. ";
    leaf name {
      type leafref {
        path "/te:te/te:tunnels/te:tunnel/te:name";
        require-instance false;
      }
      description "Dependency tunnel name";
    }
    leaf encoding {
      type identityref {
        base te-types:lsp-encoding-types;
      }
      description "LSP encoding type";
      reference "RFC3945";
    }
    leaf switching-type {
      type identityref {
        base te-types:switching-capabilities;
      }
      description "LSP switching type";
      reference "RFC3945";
    }
  }
}