openconfig-lacp

This module describes configuration and operational state data for Link Aggregation Control Protocol (LACP) for managing aggrega...

  • Version: 2017-05-05

    openconfig-lacp@2017-05-05


    
      module openconfig-lacp {
    
        yang-version 1;
    
        namespace
          "http://openconfig.net/yang/lacp";
    
        prefix oc-lacp;
    
        import openconfig-interfaces {
          prefix oc-if;
        }
        import openconfig-yang-types {
          prefix oc-yang;
        }
        import openconfig-extensions {
          prefix oc-ext;
        }
    
        organization "OpenConfig working group";
    
        contact
          "OpenConfig working group
        www.openconfig.net";
    
        description
          "This module describes configuration and operational state
        data for Link Aggregation Control Protocol (LACP) for
        managing aggregate interfaces.   It works in conjunction with
        the OpenConfig interfaces and aggregate interfaces models.";
    
        revision "2017-05-05" {
          description
            "Add member local and remote port num";
          reference
            "1.1.0";
    
        }
    
        revision "2016-05-26" {
          description
            "OpenConfig public release";
          reference
            "1.0.2";
    
        }
    
        oc-ext:openconfig-version "1.1.0";
    
        typedef lacp-activity-type {
          type enumeration {
            enum "ACTIVE" {
              value 0;
              description
                "Interface is an active member, i.e., will detect and
              maintain aggregates";
            }
            enum "PASSIVE" {
              value 1;
              description
                "Interface is a passive member, i.e., it participates
              with an active partner";
            }
          }
          description
            "Describes the LACP membership type, active or passive, of the
          interface in the aggregate";
          reference
            "IEEE 802.1AX-2008";
    
        }
    
        typedef lacp-timeout-type {
          type enumeration {
            enum "LONG" {
              value 0;
              description
                "Participant wishes to use long timeouts to detect
              status of the aggregate, i.e., will expect less frequent
              transmissions. Long timeout is 90 seconds.";
            }
            enum "SHORT" {
              value 1;
              description
                "Participant wishes to use short timeouts, i.e., expects
              frequent transmissions to aggressively detect status
              changes. Short timeout is 3 seconds.";
            }
          }
          description
            "Type of timeout used, short or long, by LACP participants";
          reference
            "IEEE 802.1AX-2008";
    
        }
    
        typedef lacp-synchronization-type {
          type enumeration {
            enum "IN_SYNC" {
              value 0;
              description
                "Participant is in sync with the system id and key
              transmitted";
            }
            enum "OUT_SYNC" {
              value 1;
              description
                "Participant is not in sync with the system id and key
              transmitted";
            }
          }
          description
            "Indicates LACP synchronization state of participant";
          reference
            "IEEE 802.1AX-2008";
    
        }
    
        typedef lacp-period-type {
          type enumeration {
            enum "FAST" {
              value 0;
              description
                "Send LACP packets every second";
            }
            enum "SLOW" {
              value 1;
              description
                "Send LACP packets every 30 seconds";
            }
          }
          description
            "Defines the period options for the time between sending
          LACP messages";
          reference
            "IEEE 802.3ad";
    
        }
    
        grouping aggregation-lacp-members-config {
          description
            "Configuration data for lacp member interfaces";
        }  // grouping aggregation-lacp-members-config
    
        grouping aggregation-lacp-members-state {
          description
            "Operational status data for the member interfaces";
          leaf interface {
            type oc-if:base-interface-ref;
            description
              "Reference to interface member of the LACP aggregate";
          }
    
          leaf activity {
            type lacp-activity-type;
            description
              "Indicates participant is active or passive";
          }
    
          leaf timeout {
            type lacp-timeout-type;
            description
              "The timeout type (short or long) used by the
            participant";
          }
    
          leaf synchronization {
            type lacp-synchronization-type;
            description
              "Indicates whether the participant is in-sync or
            out-of-sync";
          }
    
          leaf aggregatable {
            type boolean;
            description
              "A true value indicates that the participant will allow
            the link to be used as part of the aggregate. A false
            value indicates the link should be used as an individual
            link";
          }
    
          leaf collecting {
            type boolean;
            description
              "If true, the participant is collecting incoming frames
            on the link, otherwise false";
          }
    
          leaf distributing {
            type boolean;
            description
              "When true, the participant is distributing outgoing
            frames; when false, distribution is disabled";
          }
    
          leaf system-id {
            type oc-yang:mac-address;
            description
              "MAC address that defines the local system ID for the
            aggregate interface";
          }
    
          leaf oper-key {
            type uint16;
            description
              "Current operational value of the key for the aggregate
            interface";
          }
    
          leaf partner-id {
            type oc-yang:mac-address;
            description
              "MAC address representing the protocol partner's interface
            system ID";
          }
    
          leaf partner-key {
            type uint16;
            description
              "Operational value of the protocol partner's key";
          }
    
          leaf port-num {
            type uint16;
            description
              "Port number of the local (actor) aggregation member";
          }
    
          leaf partner-port-num {
            type uint16;
            description
              "Port number of the partner (remote) port for this member
            port";
          }
        }  // grouping aggregation-lacp-members-state
    
        grouping aggregation-lacp-members-statistics {
          description
            "LACP packet statistics for the member interfaces";
          container counters {
            description "LACP protocol counters";
            leaf lacp-in-pkts {
              type oc-yang:counter64;
              description
                "Number of LACPDUs received";
            }
    
            leaf lacp-out-pkts {
              type oc-yang:counter64;
              description
                "Number of LACPDUs transmitted";
            }
    
            leaf lacp-rx-errors {
              type oc-yang:counter64;
              description
                "Number of LACPDU receive packet errors";
            }
    
            leaf lacp-tx-errors {
              type oc-yang:counter64;
              description
                "Number of LACPDU transmit packet errors";
            }
    
            leaf lacp-unknown-errors {
              type oc-yang:counter64;
              description
                "Number of LACPDU unknown packet errors";
            }
    
            leaf lacp-errors {
              type oc-yang:counter64;
              description
                "Number of LACPDU illegal packet errors";
            }
          }  // container counters
        }  // grouping aggregation-lacp-members-statistics
    
        grouping aggregation-lacp-members-top {
          description
            "Top-level grouping for aggregate members list";
          container members {
            config false;
            description
              "Enclosing container for the list of members interfaces of
            the aggregate. This list is considered operational state
            only so is labeled config false and has no config container";
            list member {
              key "interface";
              description
                "List of member interfaces and their associated status for
              a LACP-controlled aggregate interface.  Member list is not
              configurable here -- each interface indicates items
              its participation in the LAG.";
              leaf interface {
                type leafref {
                  path "../state/interface";
                }
                description
                  "Reference to aggregate member interface";
              }
    
              container state {
                config false;
                description
                  "Operational state data for aggregate members";
                uses aggregation-lacp-members-state;
    
                uses aggregation-lacp-members-statistics;
              }  // container state
            }  // list member
          }  // container members
        }  // grouping aggregation-lacp-members-top
    
        grouping lacp-interfaces-config {
          description
            "Configuration data for each LACP-enabled interface";
          leaf name {
            type oc-if:base-interface-ref;
            description
              "Reference to the interface on which LACP should be
            configured.   The type of the target interface must be
            ieee8023adLag";
          }
    
          leaf interval {
            type lacp-period-type;
            default 'SLOW';
            description
              "Set the period between LACP messages -- uses
            the lacp-period-type enumeration.";
          }
    
          leaf lacp-mode {
            type lacp-activity-type;
            default 'ACTIVE';
            description
              "ACTIVE is to initiate the transmission of LACP packets.
             PASSIVE is to wait for peer to initiate the transmission of
             LACP packets.";
          }
    
          leaf system-id-mac {
            type oc-yang:mac-address;
            description
              "The MAC address portion of the node's System ID. This is
            combined with the system priority to construct the 8-octet
            system-id";
          }
    
          uses aggregation-lacp-global-config;
        }  // grouping lacp-interfaces-config
    
        grouping lacp-interfaces-state {
          description
            "Operational state data for each LACP-enabled interface";
        }  // grouping lacp-interfaces-state
    
        grouping lacp-interfaces-top {
          description
            "Top-level grouping for LACP-enabled interfaces";
          container interfaces {
            description
              "Enclosing container for the list of LACP-enabled
            interfaces";
            list interface {
              key "name";
              description
                "List of aggregate interfaces managed by LACP";
              leaf name {
                type leafref {
                  path "../config/name";
                }
                description
                  "Reference to the list key";
              }
    
              container config {
                description
                  "Configuration data for each LACP aggregate interface";
                uses lacp-interfaces-config;
              }  // container config
    
              container state {
                config false;
                description
                  "Operational state data for each LACP aggregate
                interface";
                uses lacp-interfaces-config;
    
                uses lacp-interfaces-state;
              }  // container state
    
              uses aggregation-lacp-members-top;
            }  // list interface
          }  // container interfaces
        }  // grouping lacp-interfaces-top
    
        grouping aggregation-lacp-global-config {
          description
            "Configuration data for LACP aggregate interfaces";
          leaf system-priority {
            type uint16;
            description
              "Sytem priority used by the node on this LAG interface.
            Lower value is higher priority for determining which node
            is the controlling system.";
          }
        }  // grouping aggregation-lacp-global-config
    
        grouping aggregation-lacp-global-state {
          description
            "Operational data for LACP aggregate interfaces";
        }  // grouping aggregation-lacp-global-state
    
        grouping aggregation-lacp-top {
          description
            "Top level configuration and state variable containers for
          LACP data";
          container lacp {
            description
              "Configuration and operational state data for LACP protocol
            operation on the aggregate interface";
            container config {
              description
                "Configuration data for LACP";
              uses aggregation-lacp-global-config;
            }  // container config
    
            container state {
              config false;
              description
                "Operational state data for LACP";
              uses aggregation-lacp-global-config;
    
              uses aggregation-lacp-global-state;
            }  // container state
    
            uses lacp-interfaces-top;
          }  // container lacp
        }  // grouping aggregation-lacp-top
    
        uses aggregation-lacp-top;
      }  // module openconfig-lacp
    

© 2023 YumaWorks, Inc. All rights reserved.