netconfcentral logo

openconfig-rib-bgp@2016-10-17



  module openconfig-rib-bgp {

    yang-version 1;

    namespace
      "http://openconfig.net/yang/rib/bgp";

    prefix oc-rib-bgp;

    import openconfig-bgp-types {
      prefix oc-bgpt;
    }
    import openconfig-extensions {
      prefix oc-ext;
    }

    include openconfig-rib-bgp-tables;
    include openconfig-rib-bgp-shared-attributes;
    include openconfig-rib-bgp-attributes;
    include openconfig-rib-bgp-table-attributes;

    organization "OpenConfig working group";

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

    description
      "Defines a data model for representing BGP routing table (RIB)
    contents.  The model supports 5 logical RIBs per address family:

    loc-rib: This is the main BGP routing table for the local routing
    instance, containing best-path selections for each prefix. The
    loc-rib table may contain multiple routes for a given prefix,
    with an attribute to indicate which was selected as the best
    path.  Note that multiple paths may be used or advertised even if
    only one path is marked as best, e.g., when using BGP
    add-paths.  An implementation may choose to mark multiple
    paths in the RIB as best path by setting the flag to true for
    multiple entries.

    adj-rib-in-pre: This is a per-neighbor table containing the NLRI
    updates received from the neighbor before any local input policy
    rules or filters have been applied.  This can be considered the
    'raw' updates from a given neighbor.

    adj-rib-in-post: This is a per-neighbor table containing the
    routes received from the neighbor that are eligible for
    best-path selection after local input policy rules have been
    applied.

    adj-rib-out-pre: This is a per-neighbor table containing routes
    eligible for sending (advertising) to the neighbor before output
    policy rules have been applied.

    adj-rib-out-post: This is a per-neighbor table containing routes
    eligible for sending (advertising) to the neighbor after output
    policy rules have been applied.";

    revision "2016-10-17" {
      description
        "OpenConfig BGP RIB refactor";
      reference
        "0.3.0";

    }

    revision "2016-04-11" {
      description
        "OpenConfig public release";
      reference
        "0.2.0";

    }

    oc-ext:openconfig-version "0.3.0";

    grouping bgp-rib-state {
      description
        "Operational state data for the top level BGP RIB";
      leaf afi-safi-name {
        type identityref {
          base oc-bgpt:AFI_SAFI_TYPE;
        }
        description "AFI,SAFI";
      }
    }  // grouping bgp-rib-state

    grouping bgp-rib-top {
      description
        "Top-level grouping for the BGP RIB";
      container bgp-rib {
        config false;
        description
          "Top level container for BGP RIBs";
        uses attribute-sets-top;

        uses community-sets-top;

        uses ext-community-sets-top;

        container afi-safis {
          config false;
          description
            "Enclosing container for address family list";
          list afi-safi {
            key "afi-safi-name";
            description
              "list of afi-safi types";
            leaf afi-safi-name {
              type leafref {
                path
                  "../state/afi-safi-name";
              }
              description
                "Reference to the list key";
            }

            container state {
              config false;
              description
                "Operational state data for the BGP list";
              uses bgp-rib-state;
            }  // container state

            container ipv4-unicast {
              when
                "../afi-safi-name = 'oc-bgpt:IPV4_UNICAST'" {
                description
                  "Include this container for IPv4 unicast RIB";
              }
              description
                "Routing tables for IPv4 unicast -- active when the
              afi-safi name is ipv4-unicast";
              uses ipv4-loc-rib-top;

              uses ipv4-adj-rib-top;
            }  // container ipv4-unicast

            container ipv6-unicast {
              when
                "../afi-safi-name = 'oc-bgpt:IPV6_UNICAST'" {
                description
                  "Include this container for IPv6 unicast RIB";
              }
              description
                "Routing tables for IPv6 unicast -- active when the
              afi-safi name is ipv6-unicast";
              uses ipv6-loc-rib-top;

              uses ipv6-adj-rib-top;
            }  // container ipv6-unicast
          }  // list afi-safi
        }  // container afi-safis
      }  // container bgp-rib
    }  // grouping bgp-rib-top

    uses bgp-rib-top;
  }  // module openconfig-rib-bgp