netconfcentral logo

openconfig-aft-common@2019-11-07



  submodule openconfig-aft-common {

    yang-version 1;

    belongs-to openconfig-aft {
        prefix oc-aft;
    }

    import openconfig-interfaces {
      prefix oc-if;
    }
    import openconfig-extensions {
      prefix oc-ext;
    }
    import openconfig-yang-types {
      prefix oc-yang;
    }
    import openconfig-inet-types {
      prefix oc-inet;
    }
    import openconfig-mpls-types {
      prefix oc-mplst;
    }
    import openconfig-policy-types {
      prefix oc-pol-types;
    }
    import openconfig-aft-types {
      prefix oc-aftt;
    }

    organization "OpenConfig working group";

    contact
      "OpenConfig working group
    www.openconfig.net";

    description
      "Submodule containing definitions of groupings that are re-used
    across multiple contexts within the AFT model.";

    revision "2019-11-07" {
      description
        "Move lsp-name leaf out of aft-common-entry-nexthop-state group.";
      reference
        "0.4.1";

    }

    revision "2019-08-02" {
      description
        "Add installing protocol for IPv[46] unicast entries.
      Add the ability to describe conditional next-hop groups
      outside of the policy forwarding module to allow for efficient
      handling of CBTS, where many prefixes may share the same next-hop
      criteria.";
      reference
        "0.4.0";

    }

    revision "2019-08-01" {
      description
        "Add lsp-name leaf to AFT next-hop.";
      reference
        "0.3.3";

    }

    revision "2018-11-21" {
      description
        "Add OpenConfig module metadata extensions.";
      reference
        "0.3.2";

    }

    revision "2017-08-24" {
      description "Formatting fixes";
      reference
        "0.3.1";

    }

    revision "2017-05-10" {
      description
        "Refactor to provide concretised per-AF schemas per AFT.";
      reference
        "0.3.0";

    }

    oc-ext:openconfig-version "0.4.1";

    grouping aft-nhop-structural {
      description
        "Structural grouping describing a next-hop entry.";
      container next-hops {
        description
          "The list of next-hops that are to be used for entry within
        the AFT table. The structure of each next-hop is address
        family independent, such that it is possible to resolve fully
        how the next-hop is treated. For example:

        - Where ingress IPv4 unicast packets are to be forwarded via
          an MPLS LSP, the next-hop list should indicate the MPLS
          label stack that is used to the next-hop.
        - Where ingress MPLS labelled packets are to be forwarded to
          an IPv6 nexthop (for example, a CE within a VPN, then the
          popped label stack, and IPv6 next-hop address should be
          indicated).";
        list next-hop {
          key "index";
          description
            "A next-hop associated with the forwarding instance.";
          leaf index {
            type leafref {
              path "../config/index";
            }
            description
              "A unique index identifying the next-hop entry for the
            AFT entry";
          }

          container config {
            description
              "Configuration parameters relating to the AFT next-hop
            entry";
            uses aft-common-entry-nexthop-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state parameters relating to the AFT
            next-hop entry";
            uses aft-common-entry-nexthop-config;

            uses aft-common-entry-nexthop-state;

            uses aft-labeled-entry-state;
          }  // container state

          uses oc-if:interface-ref;
        }  // list next-hop
      }  // container next-hops
    }  // grouping aft-nhop-structural

    grouping aft-common-entry-state {
      description
        "Operational state parameters relating to a forwarding entry";
      leaf packets-forwarded {
        type oc-yang:counter64;
        description
          "The number of packets which have matched, and been forwarded,
         based on the AFT entry.";
      }

      leaf octets-forwarded {
        type oc-yang:counter64;
        description
          "The number of octets which have matched, and been forwarded,
         based on the AFT entry";
      }

      leaf next-hop-group {
        type leafref {
          path
            "../../../../next-hop-groups/next-hop-group/config/id";
        }
        description
          "A reference to the next-hop-group that is in use for the entry
        within the AFT. Traffic is distributed across the set of next-hops
        within the next-hop group according to the weight.";
      }
    }  // grouping aft-common-entry-state

    grouping aft-labeled-entry-state {
      description
        "Operational state for LSP name in forwarding entry";
      leaf lsp-name {
        type string;
        description
          "Where applicable, the protocol name for the next-hop labelled
        forwarding entry. This leaf is applicable only to next-hops
        which include MPLS label information, and its value typically
        corresponds to the RSVP-TE LSP name.";
      }
    }  // grouping aft-labeled-entry-state

    grouping aft-common-entry-nexthop-config {
      description
        "Configuration parameters relating to a next-hop entry for a AFT
      entry";
      leaf index {
        type uint64;
        description
          "A unique entry for the next-hop.";
      }
    }  // grouping aft-common-entry-nexthop-config

    grouping aft-common-entry-nexthop-state {
      description
        "Parameters relating to a next-hop.";
      leaf ip-address {
        type oc-inet:ip-address;
        description
          "The IP address of the next-hop system.";
      }

      leaf mac-address {
        type oc-yang:mac-address;
        description
          "The MAC address of the next-hop if resolved by the local
        network instance.";
      }

      leaf-list pushed-mpls-label-stack {
        type oc-mplst:mpls-label;
        ordered-by user;
        description
          "The MPLS label stack imposed when forwarding packets to the
        next-hop
        - the stack is encoded as a leaf list whereby the order of the
          entries is such that the first entry in the list is the
          label at the bottom of the stack to be pushed.

        To this end, a packet which is to forwarded to a device using
        a service label of 42, and a transport label of 8072 will be
        represented with a label stack list of [42, 8072].

        The MPLS label stack list is ordered by the user, such that no
        system re-ordering of leaves is permitted by the system.

        A swap operation is reflected by entries in the
        popped-mpls-label-stack and pushed-mpls-label-stack nodes.";
      }

      leaf encapsulate-header {
        type oc-aftt:encapsulation-header-type;
        description
          "When forwarding a packet to the specified next-hop the local
        system performs an encapsulation of the packet - adding the
        specified header type.";
      }

      uses aft-common-install-protocol;
    }  // grouping aft-common-entry-nexthop-state

    grouping aft-common-install-protocol {
      description
        "Grouping for a common reference to the protocol which
      installed an entry.";
      leaf origin-protocol {
        type identityref {
          base oc-pol-types:INSTALL_PROTOCOL_TYPE;
        }
        description
          "The protocol from which the AFT entry was learned.";
      }
    }  // grouping aft-common-install-protocol

    grouping aft-common-ip-state {
      description
        "Common parameters across IP address families";
      uses aft-common-install-protocol;

      leaf decapsulate-header {
        type oc-aftt:encapsulation-header-type;
        description
          "When forwarding a packet to the specified next-hop, the local
        system performs a decapsulation of the packet - removing the
        specified header type. In the case that no next-hop is
        specified, the packet header is removed, and a subsequent
        forwarding lookup is performed on the packet encapsulated
        within the header, matched within the relevant AFT within the
        specified network-instance.";
      }
    }  // grouping aft-common-ip-state

    grouping aft-next-hop-groups-structural {
      description
        "Logical grouping for groups of next-hops.";
      container next-hop-groups {
        description
          "Surrounding container for groups of next-hops.";
        list next-hop-group {
          key "id";
          description
            "An individual set of next-hops grouped into a common group.
          Each entry within an abstract forwarding table points to a
          next-hop-group. Entries in the next-hop-group are forwarded to
          according to the weights specified for each next-hop group.

          If an entry within the next-hop group becomes unusable, for
          example due to an interface failure, the remaining entries
          are used until all entries become unusable - at which point
          the backup next-hop-group (if specified) is used.";
          leaf id {
            type leafref {
              path "../config/id";
            }
            description
              "A reference to a unique identifier for the next-hop-group.";
          }

          container config {
            description
              "Configuration parameters related to the next-hop-group.";
            uses aft-nhg-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state parameters relating to next-hop-groups.";
            uses aft-nhg-config;

            uses aft-nhg-state;
          }  // container state

          container next-hops {
            description
              "Surrounding container for the list of next-hops within
            the next-hop-group.";
            list next-hop {
              key "index";
              description
                "An individual next-hop within the next-hop-group. Each
              next-hop is a reference to an entry within the next-hop
              list.";
              leaf index {
                type leafref {
                  path "../config/index";
                }
                description
                  "A reference to the index for the next-hop within the
                the next-hop-group.";
              }

              container config {
                description
                  "Configuration parameters related to a next-hop within
                the next-hop-group.";
                uses aft-nhg-nh-config;
              }  // container config

              container state {
                config false;
                description
                  "Operational state parameters related to a next-hop
                within the next-hop-group.";
                uses aft-nhg-nh-config;

                uses aft-nhg-nh-state;
              }  // container state
            }  // list next-hop
          }  // container next-hops

          container conditional {
            description
              "When a system selects a next-hop-group based on conditions
            in addition to those specified in the referencing table entries
            (for example, DSCP is used in addition to the IPv4 destination
            prefix), these conditions are specified in the conditions list.
            Where such conditions exist, the next-hop-group MUST only
            specify next-hop-groups under the conditional list, and therefore
            MUST NOT specify any corresponding next-hops. The
            next-hop-groups that are referenced by any conditions MUST
            reference only next-hops and therefore MUST NOT be conditional
            themselves.";
            list condition {
              key "id";
              description
                "A conditional next-hop-group that is used by the AFT
              entry. The conditions that are specified within the
              group are logically ANDed together. If a condition
              is a leaf-list field its contents are logically ORed.";
              leaf id {
                type leafref {
                  path "../config/id";
                }
                description
                  "A reference to the identifier for the condition.";
              }

              container config {
                description
                  "Configuration parameters related to the conditional
                next-hop selection.";
                uses aft-nhg-conditional-config;
              }  // container config

              container state {
                config false;
                description
                  "Operational state parameters related to the conditional
                next-hop selection.";
                uses aft-nhg-conditional-config;

                uses aft-nhg-conditional-state;
              }  // container state

              container input-interfaces {
                description
                  "The set of input interfaces that are required to be matched for
                the next-hop-group condition to be met. Each non-interface condition
                is logically ANDed with each member of the list -- i.e., interfaces in
                the list are logically ORed.

                If the input-interface list is empty, the condition applies to ALL input
                interfaces.";
                list input-interface {
                  key "id";
                  description
                    "The input interface that must be matched for the condition to be met.";
                  leaf id {
                    type leafref {
                      path "../config/id";
                    }
                    description
                      "Reference to the unique ID assigned to the input interface within
                    the conditions list.";
                  }

                  container config {
                    description
                      "Configuration parameters that relate to the input interface.";
                    uses aft-nhg-conditional-interface-config;
                  }  // container config

                  container state {
                    config false;
                    description
                      "Operational state parameters that relate to the input interface.";
                    uses aft-nhg-conditional-interface-config;

                    uses aft-nhg-conditional-interface-state;
                  }  // container state
                }  // list input-interface
              }  // container input-interfaces
            }  // list condition
          }  // container conditional
        }  // list next-hop-group
      }  // container next-hop-groups
    }  // grouping aft-next-hop-groups-structural

    grouping aft-nhg-config {
      description
        "Configuration parameters related to a next-hop-group.";
      leaf id {
        type uint64;
        description
          "A unique identifier for the next-hop-group. This index
        is not expected to be consistent across reboots, or
        reprogramming of the next-hop-group. When updating
        a next-hop-group, if the group is removed by the system
        or assigned an alternate identifier, the system should
        send telemetry notifications deleting the previous
        identifier. If the identifier of the next-hop-group
        is changed, all AFT entries that reference it must
        also be updated.";
      }
    }  // grouping aft-nhg-config

    grouping aft-nhg-state {
      description
        "Operational state parameters related to a next-hop-group.";
      leaf color {
        type uint64;
        description
          "An arbitrary colour that is used as an identifier for the next-hop
        group. Some next-hop resolutions may utilise the colour to select
        the particular next-hop-group that a routing entry should be resolved
        to. In this case, next-hop-group selection may be based on colour
        matches rather than the protocol specified next-hop.

        Regardless of whether the next-hop-group's specified colour is
        used to select an AFT's active forwarding entry, the next-hop-group
        referenced by an entry should be the currently active value.

        Next-hop-groups that are installed on the system through a protocol
        that allows injection of such entries (e.g., BGP using the SR-TE
        Policy SAFI, or gRPC-based RIB programming) should have the colour
        specified in the injecting protocol within this leaf.";
      }

      leaf backup-next-hop-group {
        type leafref {
          path
            "../../../next-hop-group/config/id";
        }
        description
          "The backup next-hop-group for the current group. When all
        entries within the next-hop group become unusable, the backup
        next-hop group is used if specified.";
      }
    }  // grouping aft-nhg-state

    grouping aft-nhg-nh-config {
      description
        "Configuration parameters relating to an individual next-hop within
      a next-hop-group.";
      leaf index {
        type leafref {
          path
            "../../../../../../next-hops/next-hop/config/index";
        }
        description
          "A reference to the identifier for the next-hop to which
        the entry in the next-hop group corresponds.";
      }
    }  // grouping aft-nhg-nh-config

    grouping aft-nhg-nh-state {
      description
        "Operational state parameters relating to an individual next-hop
      within the next-hop-group.";
      leaf weight {
        type uint64;
        description
          "The weight applied to the next-hop within the group. Traffic
        is balanced across the next-hops within the group in the
        proportion of weight/(sum of weights of the next-hops within
        the next-hop group).";
      }
    }  // grouping aft-nhg-nh-state

    grouping aft-nhg-conditional-config {
      description
        "Configuration parameters relating to the conditional selection of
      a next-hop group for an AFT entry.";
      leaf id {
        type uint64;
        description
          "A unique identifier for the conditional criteria.";
      }
    }  // grouping aft-nhg-conditional-config

    grouping aft-nhg-conditional-state {
      description
        "Operational state parameters relating to the conditional selection
      of a next-hop group for an AFT entry.";
      leaf-list dscp {
        type oc-inet:dscp;
        description
          "A set of DSCP values that must be matched by an input packet for
        the next-hop-group specified to be selected. A logical OR is applied
        across the DSCP values.";
      }

      leaf next-hop-group {
        type leafref {
          path
            "../../../../../next-hop-group/config/id";
        }
        description
          "The next-hop-group that is used by the system for packets that match
        the criteria specified.";
      }
    }  // grouping aft-nhg-conditional-state

    grouping aft-nhg-conditional-interface-config {
      description
        "Configuration parameters relating to the input-interface condition for
      a next-hop-group.";
      leaf id {
        type string;
        description
          "A unique reference for the input interface.";
      }
    }  // grouping aft-nhg-conditional-interface-config

    grouping aft-nhg-conditional-interface-state {
      description
        "Operational state parameters relating to the input-interface condition
      for a next-hop-group.";
      uses oc-if:interface-ref-common;
    }  // grouping aft-nhg-conditional-interface-state
  }  // submodule openconfig-aft-common