Commit 59b21692 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/378-tid-update-nbi-ietf_network-yang-files' into 'develop'

Resolve "(TID) Update NBI IETF Network YANG files"

See merge request !438
parents 7b9f5eb4 db7cb92c
Loading
Loading
Loading
Loading
+0 −473
Original line number Diff line number Diff line
   module iana-routing-types {
     namespace "urn:ietf:params:xml:ns:yang:iana-routing-types";
     prefix iana-rt-types;

     organization
       "IANA";
     contact
       "Internet Assigned Numbers Authority

        Postal: ICANN
                12025 Waterfront Drive, Suite 300
                Los Angeles, CA  90094-2536
                United States of America
        Tel:    +1 310 301 5800
        <mailto:iana@iana.org>";

     description
       "This module contains a collection of YANG data types
        considered defined by IANA and used for routing
        protocols.

        Copyright (c) 2017 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 8294; see
        the RFC itself for full legal notices.";

      revision 2017-12-04 {
        description "Initial revision.";
        reference
          "RFC 8294: Common YANG Data Types for the Routing Area.
           Section 4.";
     }

     /*** Collection of IANA types related to routing ***/
     /*** IANA Address Family enumeration ***/

     typedef address-family {
       type enumeration {
         enum ipv4 {
           value 1;
           description
             "IPv4 Address Family.";
         }

         enum ipv6 {
           value 2;
           description
             "IPv6 Address Family.";
         }

         enum nsap {
           value 3;
           description
             "OSI Network Service Access Point (NSAP) Address Family.";
         }

         enum hdlc {
           value 4;
           description
             "High-Level Data Link Control (HDLC) Address Family.";
         }

         enum bbn1822 {
           value 5;
           description
             "Bolt, Beranek, and Newman Report 1822 (BBN 1822)
              Address Family.";
         }

         enum ieee802 {
           value 6;
           description
             "IEEE 802 Committee Address Family
              (aka Media Access Control (MAC) address).";
         }

         enum e163 {
           value 7;
           description
             "ITU-T E.163 Address Family.";
         }

         enum e164 {
           value 8;
           description
             "ITU-T E.164 (Switched Multimegabit Data Service (SMDS),
              Frame Relay, ATM) Address Family.";
         }

         enum f69 {
           value 9;
           description
             "ITU-T F.69 (Telex) Address Family.";
         }

         enum x121 {
           value 10;
           description
             "ITU-T X.121 (X.25, Frame Relay) Address Family.";
         }

         enum ipx {
           value 11;
           description
             "Novell Internetwork Packet Exchange (IPX)
              Address Family.";
         }

         enum appletalk {
           value 12;
           description
             "Apple AppleTalk Address Family.";
         }

         enum decnet-iv {
           value 13;
           description
             "Digital Equipment DECnet Phase IV Address Family.";
         }

         enum vines {
           value 14;
           description
             "Banyan Vines Address Family.";
         }

         enum e164-nsap {
           value 15;
           description
             "ITU-T E.164 with NSAP sub-address Address Family.";
         }

         enum dns {
           value 16;
           description
             "Domain Name System (DNS) Address Family.";
         }

         enum distinguished-name {
           value 17;
           description
             "Distinguished Name Address Family.";
         }

         enum as-num {
           value 18;
           description
             "Autonomous System (AS) Number Address Family.";
         }

         enum xtp-v4 {
           value 19;
           description
             "Xpress Transport Protocol (XTP) over IPv4
              Address Family.";
         }

         enum xtp-v6 {
           value 20;
           description
             "XTP over IPv6 Address Family.";
         }

         enum xtp-native {
           value 21;
           description
             "XTP native mode Address Family.";
         }

         enum fc-port {
           value 22;
           description
             "Fibre Channel (FC) World-Wide Port Name Address Family.";
         }

         enum fc-node {
           value 23;
           description
             "FC World-Wide Node Name Address Family.";
         }

         enum gwid {
           value 24;
           description
             "ATM Gateway Identifier (GWID) Number Address Family.";
         }

         enum l2vpn {
           value 25;
           description
             "Layer 2 VPN (L2VPN) Address Family.";
         }

         enum mpls-tp-section-eid {
           value 26;
           description
             "MPLS Transport Profile (MPLS-TP) Section Endpoint
              Identifier Address Family.";
         }

         enum mpls-tp-lsp-eid {
           value 27;
           description
             "MPLS-TP Label Switched Path (LSP) Endpoint Identifier
              Address Family.";
         }

         enum mpls-tp-pwe-eid {
           value 28;
           description
             "MPLS-TP Pseudowire Endpoint Identifier Address Family.";
         }

         enum mt-v4 {
           value 29;
           description
             "Multi-Topology IPv4 Address Family.";
         }

         enum mt-v6 {
           value 30;
           description
             "Multi-Topology IPv6 Address Family.";
         }

         enum eigrp-common-sf {
           value 16384;
           description
             "Enhanced Interior Gateway Routing Protocol (EIGRP)
              Common Service Family Address Family.";
         }

         enum eigrp-v4-sf {
           value 16385;
           description
             "EIGRP IPv4 Service Family Address Family.";
         }

         enum eigrp-v6-sf {
           value 16386;
           description
             "EIGRP IPv6 Service Family Address Family.";
         }

         enum lcaf {
           value 16387;
           description
             "Locator/ID Separation Protocol (LISP)
              Canonical Address Format (LCAF) Address Family.";
         }

         enum bgp-ls {
           value 16388;
           description
             "Border Gateway Protocol - Link State (BGP-LS)
              Address Family.";
         }

         enum mac-48 {
           value 16389;
           description
             "IEEE 48-bit MAC Address Family.";
         }

         enum mac-64 {
           value 16390;
           description
             "IEEE 64-bit MAC Address Family.";
         }

         enum trill-oui {
           value 16391;
           description
             "Transparent Interconnection of Lots of Links (TRILL)
              IEEE Organizationally Unique Identifier (OUI)
              Address Family.";
         }

         enum trill-mac-24 {
           value 16392;
           description
             "TRILL final 3 octets of 48-bit MAC Address Family.";
         }

         enum trill-mac-40 {
           value 16393;
           description
             "TRILL final 5 octets of 64-bit MAC Address Family.";
         }

         enum ipv6-64 {
           value 16394;
           description
             "First 8 octets (64 bits) of IPv6 address
              Address Family.";
         }

         enum trill-rbridge-port-id {
           value 16395;
           description
             "TRILL Routing Bridge (RBridge) Port ID Address Family.";
         }

         enum trill-nickname {
           value 16396;
           description
             "TRILL Nickname Address Family.";
         }
       }

       description
         "Enumeration containing all the IANA-defined
          Address Families.";

     }

     /*** Subsequent Address Family Identifiers (SAFIs) ***/
     /*** for multiprotocol BGP enumeration ***/

     typedef bgp-safi {
       type enumeration {
         enum unicast-safi {
           value 1;
           description
             "Unicast SAFI.";
         }

         enum multicast-safi {
           value 2;
           description
             "Multicast SAFI.";
         }

         enum labeled-unicast-safi {
           value 4;
           description
             "Labeled Unicast SAFI.";
         }

         enum multicast-vpn-safi {
           value 5;
           description
             "Multicast VPN SAFI.";
         }

         enum pseudowire-safi {
           value 6;
           description
             "Multi-segment Pseudowire VPN SAFI.";
         }

         enum tunnel-encap-safi {
           value 7;
           description
             "Tunnel Encap SAFI.";
         }

         enum mcast-vpls-safi {
           value 8;
           description
             "Multicast Virtual Private LAN Service (VPLS) SAFI.";
         }

         enum tunnel-safi {
           value 64;
           description
             "Tunnel SAFI.";
         }

         enum vpls-safi {
           value 65;
           description
             "VPLS SAFI.";
         }

         enum mdt-safi {
           value 66;
           description
             "Multicast Distribution Tree (MDT) SAFI.";
         }

         enum v4-over-v6-safi {
           value 67;
           description
             "IPv4 over IPv6 SAFI.";
         }

         enum v6-over-v4-safi {
           value 68;
           description
             "IPv6 over IPv4 SAFI.";
         }

         enum l1-vpn-auto-discovery-safi {
           value 69;
           description
             "Layer 1 VPN Auto-Discovery SAFI.";
         }

         enum evpn-safi {
           value 70;
           description
             "Ethernet VPN (EVPN) SAFI.";
         }

         enum bgp-ls-safi {
           value 71;
           description
             "BGP-LS SAFI.";
         }

         enum bgp-ls-vpn-safi {
           value 72;
           description
             "BGP-LS VPN SAFI.";
         }

         enum sr-te-safi {
           value 73;
           description
             "Segment Routing - Traffic Engineering (SR-TE) SAFI.";
         }

         enum labeled-vpn-safi {
           value 128;
           description
             "MPLS Labeled VPN SAFI.";
         }

         enum multicast-mpls-vpn-safi {
           value 129;
           description
             "Multicast for BGP/MPLS IP VPN SAFI.";
         }

         enum route-target-safi {
           value 132;
           description
             "Route Target SAFI.";
         }

         enum ipv4-flow-spec-safi {
           value 133;
           description
             "IPv4 Flow Specification SAFI.";
         }

         enum vpnv4-flow-spec-safi {
           value 134;
           description
             "IPv4 VPN Flow Specification SAFI.";
         }

         enum vpn-auto-discovery-safi {
           value 140;
           description
             "VPN Auto-Discovery SAFI.";
         }
       }
       description
         "Enumeration for BGP SAFI.";
       reference
         "RFC 4760: Multiprotocol Extensions for BGP-4.";
     }
   }
+648 −0

File added.

Preview size limit exceeded, changes collapsed.

+0 −1004

File deleted.

Preview size limit exceeded, changes collapsed.

+987 −0

File added.

Preview size limit exceeded, changes collapsed.

+0 −457
Original line number Diff line number Diff line
 module ietf-eth-tran-types {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang: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.ietf@gmail.com);
           Anton Snitser (antons@sedonasys.com);
           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);
           Chaode Yu (yuchaode@huawei.com)
       ";

     description
       "This module defines the ETH types.
        The model fully conforms to the Network Management
        Datastore Architecture (NMDA).

        Copyright (c) 2019 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 2023-10-23 {
       description
         "version -05 as a WG draft";
       reference
         "draft-ietf-ccamp-client-signal-yang";
     }

     /*
      * Identities
      */

     identity eth-vlan-tag-type {
       description
         "ETH VLAN tag type.";
     }

     identity c-vlan-tag-type {
       base eth-vlan-tag-type;
       description
         "802.1Q Customer VLAN";
     }

     identity s-vlan-tag-type {
       base eth-vlan-tag-type;
       description
         "802.1Q Service VLAN (QinQ)";
     }

     identity service-classification-type {
       description
         "Service classification.";
     }

     identity port-classification {
       base service-classification-type;
       description
         "Port classification.";
     }
     identity vlan-classification {
       base service-classification-type;
       description
         "VLAN classification.";
     }

     identity eth-vlan-tag-classify {
       description
         "VLAN tag classification.";
     }

     identity classify-c-vlan {
       base eth-vlan-tag-classify;
       description
         "Classify 802.1Q Customer VLAN tag.
          Only C-tag type is accepted";
     }

     identity classify-s-vlan {
       base eth-vlan-tag-classify;
       description
         "Classify 802.1Q Service VLAN (QinQ) tag.
          Only S-tag type is accepted";
     }

     identity classify-s-or-c-vlan {
       base eth-vlan-tag-classify;
       description
         "Classify S-VLAN or C-VLAN tag-classify.
          Either tag is accepted";
     }

     identity bandwidth-profile-type-ir {
       description
         "Bandwidth Profile Types";
     }

     identity mef-10-bwp {
       base bandwidth-profile-type-ir;
       description
         "MEF 10 Bandwidth Profile";
     }

     identity rfc-2697-bwp {
       base bandwidth-profile-type-ir;
       description
         "RFC 2697 Bandwidth Profile";
     }
     identity rfc-2698-bwp {
       base bandwidth-profile-type-ir;
       description
         "RFC 2698 Bandwidth Profile";
     }

     identity rfc-4115-bwp {
       base bandwidth-profile-type-ir;
       description
         "RFC 4115 Bandwidth Profile";
     }

     identity service-type-ir {
       description
         "Type of Ethernet service.";
     }

     identity p2p-svc {
       base service-type-ir;
       description
         "Ethernet point-to-point service (EPL, EVPL).";
     }

     identity rmp-svc {
       base service-type-ir;
       description
         "Ethernet rooted-multitpoint service (E-TREE, EP-TREE).";
     }

     identity mp2mp-svc {
       base service-type-ir;
       description
         "Ethernet multipoint-to-multitpoint service (E-LAN, EP-LAN).";
     }

     identity lifecycle-status-ir {
       description
         "Lifecycle Status.";
     }

     identity installed {
       base lifecycle-status-ir;
       description
         "Installed.";
     }

     identity planned {
       base lifecycle-status-ir;
       description
         "Planned.";
     }

     identity pending-removal {
       base lifecycle-status-ir;
       description
         "Pending Removal.";
     }

     /*
      * Type Definitions
      */

     typedef eth-tag-type {
       type identityref {
         base eth-vlan-tag-type;
       }
       description
         "Identifies a specific ETH VLAN tag type.";
     }

     typedef eth-tag-classify {
       type identityref {
         base eth-vlan-tag-classify;
       }
       description
         "Identifies a specific VLAN tag classification.";
     }

     typedef vlanid {
       type uint16 {
         range "1..4094";
       }
       description
         "The 12-bit VLAN-ID used in the VLAN Tag header.";
     }

     typedef vid-range-type {
       type string {
         pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?" +
                 "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)";
       }
       description
         "A list of VLAN Ids, or non overlapping VLAN ranges, in
          ascending order, between 1 and 4094.
          This type is used to match an ordered list of VLAN Ids, or
          contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the
          range 1 to 4094, and included in the list in non overlapping
          ascending order.

          For example: 1,10-100,50,500-1000";
     }

     typedef bandwidth-profile-type {
       type identityref {
         base bandwidth-profile-type-ir;
       }
       description
         "Identifies a specific Bandwidth Profile type.";
     }

     typedef service-type {
       type identityref {
         base service-type-ir;
       }
       description
         "Identifies the type of Ethernet service.";
     }

     typedef lifecycle-status {
       type identityref {
         base lifecycle-status-ir;
       }
       description
         "Identifies the lLifecycle Status .";
     }

     /*
      * Grouping Definitions
      */

     grouping etht-bandwidth-profiles {
       description
         "Bandwidth profile configuration paramters.";

       leaf bandwidth-profile-type {
         type etht-types:bandwidth-profile-type;
         description
           "The type of bandwidth profile.";
       }
       leaf CIR {
         type uint64;
         description
           "Committed Information Rate in Kbps";
       }
       leaf CBS {
         type uint64;
         description
           "Committed Burst Size in in KBytes";
       }
       leaf EIR {
         type uint64;
         /* Need to indicate that EIR is not supported by RFC 2697

         must
           '../bw-profile-type = "mef-10-bwp" or ' +
           '../bw-profile-type = "rfc-2698-bwp" or ' +
           '../bw-profile-type = "rfc-4115-bwp"'

         must
           '../bw-profile-type != "rfc-2697-bwp"'
         */
         description
           "Excess Information Rate in Kbps
            In case of RFC 2698, PIR = CIR + EIR";
       }
       leaf EBS {
         type uint64;
         description
           "Excess Burst Size in KBytes.
             In case of RFC 2698, PBS = CBS + EBS";
       }
       leaf color-aware {
         type boolean;
         description
           "Indicates weather the color-mode is
           color-aware or color-blind.";
       }
       leaf coupling-flag {
         type boolean;
         /* Need to indicate that Coupling Flag is defined only for MEF 10

         must
           '../bw-profile-type = "mef-10-bwp"'
         */
         description
           "Coupling Flag.";
       }
     }

     identity topology-role {
       description
         "The role of underlay topology: e.g., hub, spoke,
         any-to-any.";
     }

     identity resilience {
       description
       "Placeholder for resilience information in data plane,
       for future study. ";
     }

     identity access-role {
       description
       "Indicating whether the access is a working or protection access.";
     }

     identity root-primary {
       base access-role;
       description
         "Designates the primary root UNI of an E-Tree service, and may also
              designates the UNI access role of E-LINE and E-LAN service.";
     }

     identity root-backup {
       base access-role;
       description
         "Designates the backup root UNI of an E-Tree service.";
     }

     identity leaf-access {
       base access-role;
       description
         "Designates the leaf UNI of an E-Tree service.";
     }

     identity leaf-edge {
       base access-role;
       description "";
     }

     identity performance {
       description
       "Placeholder for performance information, for future study.";
     }

     identity encapsulation-type {
       description
       "Indicating how the service is encapsulated (to PW), e.g, raw or tag. ";
     }
     grouping pw-segement-bandwidth-profile-grouping {
       description
         "bandwidth profile grouping for PW segment. ";
       leaf bandwidth-profile-type {
         type etht-types:bandwidth-profile-type;
         description
           "The type of bandwidth profile.";
       }
       leaf CIR {
         type uint64;
         description
           "Committed Information Rate in Kbps";
       }
       leaf CBS {
         type uint64;
         description
           "Committed Burst Size in in KBytes";
       }
       leaf EIR {
         type uint64;
         /* Need to indicate that EIR is not supported by RFC 2697

         must
           '../bw-profile-type = "mef-10-bwp" or ' +
           '../bw-profile-type = "rfc-2698-bwp" or ' +
           '../bw-profile-type = "rfc-4115-bwp"'

         must
           '../bw-profile-type != "rfc-2697-bwp"'
         */
         description
           "Excess Information Rate in Kbps
            In case of RFC 2698, PIR = CIR + EIR";
       }
       leaf EBS {
         type uint64;
         description
           "Excess Burst Size in KBytes.
             In case of RFC 2698, PBS = CBS + EBS";
       }
     }
         grouping eth-bandwidth {
         description
           "Available bandwith for ethernet.";
         leaf eth-bandwidth {
           type uint64{
             range "0..10000000000";
           }
           units "Kbps";
           description
             "Available bandwith value expressed in kilobits per second";
         }
       }

       grouping eth-label-restriction {
         description
           "Label Restriction for ethernet.";
         leaf tag-type {
           type etht-types:eth-tag-type;
           description "VLAN tag type.";
         }
         leaf priority {
           type uint8;
           description "priority.";
         }
       }
       grouping eth-label {
         description
           "Label for ethernet.";
         leaf vlanid {
           type etht-types:vlanid;
             description
               "VLAN tag id.";
         }
       }

       grouping eth-label-step {
         description "Label step for Ethernet VLAN";
         leaf eth-step {
           type uint16 {
             range "1..4095";
         }
         default 1;
         description
           "Label step which represent possible increments for
            an Ethernet VLAN tag.";
         reference
           "IEEE 802.1ad: Provider Bridges.";
       }
     }
   }
Loading