ieee802-dot1q-cfm-bridge

Connectivity Fault Management (CFM) comprises capabilities for detecting, verifying, and isolating connectivity failures in Virt...

  • Version: 2020-06-04

    ieee802-dot1q-cfm-bridge@2020-06-04


    
      module ieee802-dot1q-cfm-bridge {
    
        yang-version 1.1;
    
        namespace
          "urn:ieee:std:802.1Q:yang:ieee802-dot1q-cfm-bridge";
    
        prefix cfm-bridge;
    
        import ieee802-dot1q-bridge {
          prefix dot1q;
        }
        import ieee802-dot1q-cfm {
          prefix dot1q-cfm;
        }
        import ietf-interfaces {
          prefix if;
        }
        import ieee802-types {
          prefix ieee;
        }
        import ieee802-dot1q-cfm-types {
          prefix cfm-types;
        }
        import ieee802-dot1q-types {
          prefix dot1q-types;
        }
    
        organization "IEEE 802.1 Working Group";
    
        contact
          "WG-URL: http://ieee802.org/1/
        WG-EMail: stds-802-1-l@ieee.org
        
        Contact: IEEE 802.1 Working Group Chair
        Postal: C/O IEEE 802.1 Working Group
                IEEE Standards Association
                445 Hoes Lane
                Piscataway, NJ 08854
                USA
       
        E-mail: stds-802-1-chairs@ieee.org";
    
        description
          "Connectivity Fault Management (CFM) comprises capabilities
        for detecting, verifying, and isolating connectivity failures
        in Virtual Bridged Local Area Networks. This module binds
        the CFM modules to an IEEE 802.1Q Bridge.";
    
        revision "2020-06-04" {
          description
            "Published as part of IEEE Std 802.1Qcx-2020.
          Initial version.";
          reference
            "IEEE Std 802.1Qcx-2020, Bridges and Bridged Networks -
            YANG Data Model for Connectivity Fault Management.";
    
        }
    
    
        typedef bridge-ref {
          type leafref {
            path "/dot1q:bridges/dot1q:bridge/dot1q:name";
          }
          description
            "This type is used by data models that need to reference
          a configured Bridge.";
        }
    
        typedef port-ref {
          type if:interface-ref;
          description
            "This type is used to represent interfaces that can be used
          by a Bridge device.";
        }
    
        grouping service-id-grouping {
          description
            "The list of VIDs, the I-SID, the TE-SID, or the SEG-ID
          monitored by this MA, if present. In the case that a list
          of VIDs is specified, the first VID in the list is the MA's
          Primary VID (default none). The specification of I-SID is 
          allowed only in the case of I- or B-components. The TE-SID
          is allowed only in the case that PBB-TE or SPBM is supported.
          The SEG-ID is allowed only in the case that IPS is supported.";
          choice service-id {
            description
              "The type of service identifier.";
            list vid {
              key "vlan-id";
              description
                "A list of VIDs associated with any MHF on the
                VID, always including that VID. The first VID is the 
                MA's primary VID. List is empty if no primary VID 
                specified";
              leaf vlan-id {
                type dot1q-types:vlanid;
                description
                  "The 12-bit VLAN identifier.";
              }
            }  // list vid
            leaf isid {
              type uint32 {
                range "1..16777215";
              }
              description
                "24-bit I-SID identifier.";
            }
            leaf tesid {
              type uint32 {
                range "1..4294967295";
              }
              description
                "The tesid is used as a service selector for MAs that are
                present in Bridges that implement PBB-TE functionality.";
            }
            leaf segid {
              type uint32 {
                range "1..4294967295";
              }
              description
                "The segid is used as a service selector for MAs that are
                present in Bridges that implement IPS functionality.";
            }
            leaf path-tesid {
              type uint32 {
                range "1..4294967295";
              }
              description
                "The path-tesid is used as a service selector for SPBM
                path MAs.";
            }
            leaf group-isid {
              type uint32 {
                range "1..4294967295";
              }
              description
                "The group-isid is used as a service selector for SPBM
                group MAs.";
            }
          }  // choice service-id
        }  // grouping service-id-grouping
    
        augment /dot1q-cfm:cfm {
          description
            "Augment the base/common CFM model with CFM Bridge 
          specific attributes.";
          list cfm-stack {
            key "port service-selector service-id md-level direction";
            config false;
            description
              "The CFM Stack contains information about the Maintenance
            Points configured on a particular Bridge Port (or
            Aggregation Port). It contains all CFM Stack specific related
            configuration and operational data.
            
            Upon a restart of the system, the system SHALL, if necessary,
            change the value of this variable, and rearrange the
            cfm-stack, so that it indexes the entry in the
            interface table with the same value of interface-ref that it
            indexed before the system restart. If no such entry exists,
            then the system SHALL delete all entries in the
            cfm-stack with the interface index.";
            leaf port {
              type port-ref;
              description
                "An interface on which maintenance points might be 
              configured. This object represents the Bridge Port or 
              Aggregation Port on which MEPs or MHFs might be 
              configured.";
              reference
                "12.14.2.1.2a of IEEE Std 802.1Q-2018";
    
            }
    
            leaf md-level {
              type cfm-types:md-level-type;
              description
                "The MD level of the maintenance point";
              reference
                "12.14.2.1.2b  of IEEE Std 802.1Q-2018";
    
            }
    
            leaf direction {
              type cfm-types:mp-direction-type;
              description
                "The direction in which the maintenance point faces on the 
              Bridge Port.";
              reference
                "12.14.2.1.2c of IEEE Std 802.1Q-2018";
    
            }
    
            leaf service-selector {
              type cfm-types:service-selector-type;
              description
                "The type of the service selector";
            }
    
            leaf service-id {
              type cfm-types:service-selector-value-type;
              description
                "A VID, I-SID, Traffic Engineering service 
              instance Identifier (TE-SID), or Segment Identifier
              (SEG-ID) associated with an MP, or 0, in the case that
              the MP is associated with no VID, I-SID, TE-SID, or SEG-ID.";
              reference
                "12.14.2.1.2d of IEEE Std 802.1Q-2018";
    
            }
    
            leaf maintenance-group-id {
              when
                '../maintenance-point = "mep"' {
                description
                  "This should only exist if the configured
                maintenance point is a MEP (and not a MHF).";
              }
              type leafref {
                path "/dot1q-cfm:cfm/dot1q-cfm:maintenance-group/dot1q-cfm:maintenance-group-id";
              }
              mandatory true;
              description
                "The maintenance group that the MEP is associated with. If
              the Maintenance Point is a MHF created due to an entry in
              the default-md-levels list, it has no associated 
              maintenance group, and therefore this leaf is not present.";
            }
    
            leaf mep-id {
              when
                '../maintenance-point = "mep"' {
                description
                  "This should only exist if the configured
                maintenance-point is a MEP.";
              }
              type leafref {
                path "/dot1q-cfm:cfm/dot1q-cfm:maintenance-group[dot1q-cfm:maintenance-group-id = current()/../maintenance-group-id]/dot1q-cfm:mep/dot1q-cfm:mep-id";
              }
              mandatory true;
              description
                "The MEP identifier if a MEP is configured. Does not exist
              if the maintenance point is a MHF.";
              reference
                "12.14.2.1.3d of IEEE Std 802.1Q-2018";
    
            }
    
            leaf md-id {
              when
                '../maintenance-point != "mep"' {
                description
                  "This should only exist if the configured
                maintenance point is a MHF (and not a MEP).";
              }
              type leafref {
                path "/dot1q-cfm:cfm/dot1q-cfm:maintenance-domain/dot1q-cfm:md-id";
              }
              description
                "The maintenance domain that the MHF is 
              associated with.  If the MHF is 
              created due to an entry in the default-md-levels list, 
              it has no associated maintenance domain, and therefore this
              leaf is not present.";
            }
    
            leaf ma-id {
              when
                '../maintenance-point != "mep"' {
                description
                  "This should only exist if the configured maintenance
                point is a MHF (and not a MEP), and it has a
                Maintenance Domain.";
              }
              type leafref {
                path "/dot1q-cfm:cfm/dot1q-cfm:maintenance-domain[dot1q-cfm:md-id = current()/../md-id]/dot1q-cfm:maintenance-association/dot1q-cfm:ma-id";
              }
              description
                "The maintenance association that the MHF is associated
              with.  If the MHF is created due to an entry in the 
              default-md-levels list, it has no associated maintenance
              association, and therefore this leaf is not present.";
            }
    
            leaf mac-address {
              type ieee:mac-address;
              mandatory true;
              description
                "The MAC address of the maintenance point.";
              reference
                "12.14.2.1.3e of IEEE Std 802.1Q-2018";
    
            }
    
            leaf maintenance-point {
              type cfm-types:mp-type;
              mandatory true;
              description
                "Indicates the type of maintenance point. That is whether a
              MEP or MHF.";
              reference
                "12.14.2.1.3a of IEEE Std 802.1Q-2018";
    
            }
          }  // list cfm-stack
    
          list default-md-level {
            key "bridge-id component-id service-selector primary-service-id";
            description
              "For each bridge component, the Default MD Level Managed 
            Object controls MHF creation for VIDs that are not attached
            to a specific Maintenance Association Managed Object, and
            Sender ID TLV transmission by those MHFs.
            
            For each Bridge Port, and for each VLAN ID whose data can
            pass through that Bridge Port, an entry in this table is
            used by the algorithm in subclause 22.2.3 only if there is no
            entry in the Maintenance Association table defining an MA
            for the same VLAN ID and MD Level as this table's entry, and
            on which MA an Up MEP is defined. If there exists such an
            MA, that MA's objects are used by the algorithm in
            subclause 22.2.3 in place of this table entry objects.
            
            The agent maintains the value of md-status to indicate
            whether this entry is overridden by an MA. When first
            initialized, the agent creates this table automatically with
            entries for all VLAN IDs, with the default values specified
            for each object. After this initialization, the writable
            objects in this table need to be persistent upon reboot or
            restart of a device.";
            leaf bridge-id {
              type bridge-ref;
              description
                "The reference to the IEEE 802.1Q Bridge associated with
              the CFM objects.";
            }
    
            leaf component-id {
              type leafref {
                path
                  '/dot1q:bridges/dot1q:bridge'
                    + '[dot1q:name = current()/../bridge-id]'
                    + '/dot1q:component/dot1q:name';
              }
              description
                "The Bridge component within the system to which the
              information in this entry applies. If the system is not a
              Bridge, or if only one component is present in the Bridge,
              then this variable (index) MUST be equal to 1.";
              reference
                "12.3l of IEEE Std 802.1Q-2018";
    
            }
    
            leaf service-selector {
              type cfm-types:service-selector-type;
              description
                "The type of the service selector";
            }
    
            leaf primary-service-id {
              type cfm-types:service-selector-value-type;
              description
                "A vid or isid in an I or B component.";
              reference
                "12.14.3.1.2a of IEEE Std 802.1Q-2018";
    
            }
    
            container associated-service-ids {
              description
                "A list of VIDs associated with any MHF on the VID, always
              including that VID, or the Backbone-SID of the B-component
              or VIP-SID of the I-component associated with any MHF on
              the I-SID. The first VID is the MAs Primary VID.
              
              List is empty if no primary VID specified.";
              reference
                "12.14.3.1.3a of IEEE Std 802.1Q-2018";
    
              uses service-id-grouping;
            }  // container associated-service-ids
    
            leaf md-status {
              type boolean;
              config false;
              mandatory true;
              description
                "A Boolean value indicating whether this entry is in effect
              or has been overridden by the existence of a Maintenance
              Association managed object associated with the same VID or
              I-SID of I- or B-components and MD Level, and on which is
              configured an Up MEP. True if this Maintenance Domain
              managed object is in effect.";
              reference
                "12.14.3.1.3b of IEEE Std 802.1Q-2018";
    
            }
    
            leaf md-level {
              type cfm-types:md-level-type;
              mandatory true;
              description
                "A value indicating the MD Level at which MHFs are to be
              created, and Sender ID TLV transmission by those MHFs is to
              be controlled, for the VLAN to which this entry's objects
              apply.";
              reference
                "12.14.3.1.3c, 12.14.3.2.2b of IEEE Std 802.1Q-2018";
    
            }
    
            leaf mhf-creation {
              type cfm-types:mhf-creation-type;
              must '. != "mhf-defer"' {
                description
                  "The value can not be mhf-defer. Must be one of mhf-none,
                mhf-default, or mfh-explicit.";
              }
              default "mhf-none";
              description
                "An enumerated value indicating whether the management 
              entity can create MHFs for this VID(s) or I-SID(s) of I- or
              B-components.";
              reference
                "12.14.3.1.3d of IEEE Std 802.1Q-2018";
    
            }
    
            leaf id-permission {
              type cfm-types:sender-id-permission-type;
              must '. != "send-id-defer"' {
                description
                  "The value can not be send-id-defer. Must be one of 
                send-id-none, send-id-chassis, send-id-manage,
                send-id-chassis-manage.";
              }
              default "send-id-none";
              description
                "An enumerated value indicating what, if anything, is to be
              included in the Sender ID TLV transmitted by MPs configured
              in the Default Maintenance Domain.";
              reference
                "12.14.3.1.3e, 12.14.3.2.2a of IEEE Std 802.1Q-2018";
    
            }
          }  // list default-md-level
    
          list config-error {
            key "port service-selector service-id";
            config false;
            description
              "The CFM Configuration Error List table provides a list of
            Interfaces and VIDs that are incorrectly configured.";
            leaf port {
              type port-ref;
              description
                "The interface index of the interface (i.e., Bridge 
              Port).
              
              Upon a restart of the system, the system SHALL, if 
              necessary, change the value of this variable so that it
              indexes the entry in the interface table with the same
              value of the index that it indexed before the system
              restart. If no such entry exists, then the system SHALL
              delete any entries in config-error-list indexed by that
              interface-ref.";
              reference
                "12.14.4.1.2b of IEEE Std 802.1Q-2018";
    
            }
    
            leaf service-selector {
              type cfm-types:service-selector-type;
              description
                "The type of the service selector";
            }
    
            leaf service-id {
              type cfm-types:service-selector-value-type;
              description
                "A vid or isid in an I or B component.";
              reference
                "12.14.4.1.2a of IEEE Std 802.1Q-2018";
    
            }
    
            leaf error-type {
              type cfm-types:config-error-type;
              mandatory true;
              description
                "vector of Boolean error conditions from 22.2.4.";
              reference
                "12.14.4.1.3b of IEEE Std 802.1Q-2018";
    
            }
          }  // list config-error
        }
    
        augment /dot1q-cfm:cfm/dot1q-cfm:maintenance-group {
          when "dot1q-cfm:maintenance-group-id";
          description
            "Augment the maintenance group list object with the
          maintenance association component identifier, since the 
          maintenance association component is an Bridge
          specific attributes.";
          leaf bridge-id {
            type bridge-ref;
            description
              "The reference to the IEEE 802.1Q Bridge associated with
            the CFM objects.";
          }
    
          leaf component-name {
            when "../bridge-id";
            type leafref {
              path "/dot1q:bridges/dot1q:bridge[dot1q:name = current()/../cfm-bridge:bridge-id]/dot1q:component/dot1q:name";
            }
            mandatory true;
            description
              "A reference to the maintenance association component within
            the provided maintenance domain and maintenance association
            values.";
          }
    
          container service-id {
            description
              "The service identifier grouping.";
            uses service-id-grouping;
          }  // container service-id
        }
    
        augment /dot1q-cfm:cfm/dot1q-cfm:maintenance-group/dot1q-cfm:mep {
          when "dot1q-cfm:mep-id";
          description
            "Augment the MEP object defined in the ieee802-dot1q-cfm
          (CFM MEP) YANG module with Bridge specific attributes.";
          leaf port {
            type port-ref;
            must
              'not(/dot1q-cfm:cfm'
                + '/dot1q-cfm:maintenance-group'
                + '/cfm-bridge:component-name)'
                + ' or '
                + '/dot1q-cfm:cfm'
                + '/dot1q-cfm:maintenance-group'
                + '/cfm-bridge:component-name = '
                + '/if:interfaces/if:interface[current() = ./if:name]'
                + '/dot1q:bridge-port/dot1q:component-name' {
              description
                "If there is a Bridge Component, then the component of the 
              port (Interface) reference must be the same as the bridge 
              and component references by the maintenance association
              group.";
            }
            mandatory true;
            description
              "The interface index of the interface (e.g., Bridge 
            Port) to which the MEP is attached.";
            reference
              "12.14.7.1.3b of IEEE Std 802.1Q-2018";
    
          }
    
          leaf primary-vid {
            type leafref {
              path "../../service-id/vid/vlan-id";
            }
            description
              "An integer indicating the Primary VID of the MEP. It
            is always one of the VIDs assigned to the MEPs MA. If not
            present, then indicates that either the Primary VID is
            that of the MEPs MA, or that the MEPs MA is 
            associated with no VID.";
            reference
              "12.14.7.1.3d of IEEE Std 802.1Q-2018";
    
          }
        }
      }  // module ieee802-dot1q-cfm-bridge
    

© 2023 YumaWorks, Inc. All rights reserved.