netconfcentral logo

openconfig-bgp-common-multiprotocol@2017-07-30



  submodule openconfig-bgp-common-multiprotocol {

    yang-version 1;

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

    import openconfig-extensions {
      prefix oc-ext;
    }
    import openconfig-bgp-types {
      prefix oc-bgp-types;
    }
    import openconfig-routing-policy {
      prefix oc-rpol;
    }
    import openconfig-types {
      prefix oc-types;
    }

    include openconfig-bgp-common;

    organization "OpenConfig working group";

    contact
      "OpenConfig working group
    netopenconfig@googlegroups.com";

    description
      "This sub-module contains groupings that are related to support
    for multiple protocols in BGP. The groupings are common across
    multiple contexts.";

    revision "2017-07-30" {
      description
        "Clarification of add-paths send-max leaf";
      reference
        "4.0.1";

    }

    revision "2017-07-10" {
      description
        "Add error notifications; moved add-paths config; add AS
      prepend policy features; removed unneeded config leaves";
      reference
        "4.0.0";

    }

    revision "2017-02-02" {
      description
        "Bugfix to remove remaining global-level policy data";
      reference
        "3.0.1";

    }

    revision "2017-01-26" {
      description
        "Add dynamic neighbor support, migrate to OpenConfig types";
      reference
        "3.0.0";

    }

    revision "2016-06-21" {
      description "OpenConfig BGP refactor";
      reference
        "2.1.1";

    }

    oc-ext:openconfig-version "4.0.1";

    grouping bgp-common-mp-afi-safi-graceful-restart-config {
      description
        "BGP graceful restart parameters that apply on a per-AFI-SAFI
      basis";
      leaf enabled {
        type boolean;
        default 'false';
        description
          "This leaf indicates whether graceful-restart is enabled for
        this AFI-SAFI";
      }
    }  // grouping bgp-common-mp-afi-safi-graceful-restart-config

    grouping bgp-common-mp-afi-safi-config {
      description
        "Configuration parameters used for all BGP AFI-SAFIs";
      leaf afi-safi-name {
        type identityref {
          base oc-bgp-types:AFI_SAFI_TYPE;
        }
        description "AFI,SAFI";
      }

      leaf enabled {
        type boolean;
        default 'false';
        description
          "This leaf indicates whether the IPv4 Unicast AFI,SAFI is
        enabled for the neighbour or group";
      }
    }  // grouping bgp-common-mp-afi-safi-config

    grouping bgp-common-mp-all-afi-safi-list-contents {
      description
        "A common grouping used for contents of the list that is used
      for AFI-SAFI entries";
      uses oc-rpol:apply-policy-group;

      uses bgp-common-mp-ipv4-unicast-group;

      uses bgp-common-mp-ipv6-unicast-group;

      uses bgp-common-mp-ipv4-labeled-unicast-group;

      uses bgp-common-mp-ipv6-labeled-unicast-group;

      uses bgp-common-mp-l3vpn-ipv4-unicast-group;

      uses bgp-common-mp-l3vpn-ipv6-unicast-group;

      uses bgp-common-mp-l3vpn-ipv4-multicast-group;

      uses bgp-common-mp-l3vpn-ipv6-multicast-group;

      uses bgp-common-mp-l2vpn-vpls-group;

      uses bgp-common-mp-l2vpn-evpn-group;
    }  // grouping bgp-common-mp-all-afi-safi-list-contents

    grouping bgp-common-mp-ipv4-unicast-group {
      description
        "Group for IPv4 Unicast configuration options";
      container ipv4-unicast {
        when
          "../afi-safi-name = 'oc-bgp-types:IPV4_UNICAST'" {
          description
            "Include this container for IPv4 Unicast specific
          configuration";
        }
        description
          "IPv4 unicast configuration options";
        uses bgp-common-mp-ipv4-ipv6-unicast-common;
      }  // container ipv4-unicast
    }  // grouping bgp-common-mp-ipv4-unicast-group

    grouping bgp-common-mp-ipv6-unicast-group {
      description
        "Group for IPv6 Unicast configuration options";
      container ipv6-unicast {
        when
          "../afi-safi-name = 'oc-bgp-types:IPV6_UNICAST'" {
          description
            "Include this container for IPv6 Unicast specific
          configuration";
        }
        description
          "IPv6 unicast configuration options";
        uses bgp-common-mp-ipv4-ipv6-unicast-common;
      }  // container ipv6-unicast
    }  // grouping bgp-common-mp-ipv6-unicast-group

    grouping bgp-common-mp-ipv4-labeled-unicast-group {
      description
        "Group for IPv4 Labeled Unicast configuration options";
      container ipv4-labeled-unicast {
        when
          "../afi-safi-name = 'oc-bgp-types:IPV4_LABELED_UNICAST'" {
          description
            "Include this container for IPv4 Labeled Unicast specific
          configuration";
        }
        description
          "IPv4 Labeled Unicast configuration options";
        uses bgp-common-mp-all-afi-safi-common;
      }  // container ipv4-labeled-unicast
    }  // grouping bgp-common-mp-ipv4-labeled-unicast-group

    grouping bgp-common-mp-ipv6-labeled-unicast-group {
      description
        "Group for IPv6 Labeled Unicast configuration options";
      container ipv6-labeled-unicast {
        when
          "../afi-safi-name = 'oc-bgp-types:IPV6_LABELED_UNICAST'" {
          description
            "Include this container for IPv6 Labeled Unicast specific
          configuration";
        }
        description
          "IPv6 Labeled Unicast configuration options";
        uses bgp-common-mp-all-afi-safi-common;
      }  // container ipv6-labeled-unicast
    }  // grouping bgp-common-mp-ipv6-labeled-unicast-group

    grouping bgp-common-mp-l3vpn-ipv4-unicast-group {
      description
        "Group for IPv4 Unicast L3VPN configuration options";
      container l3vpn-ipv4-unicast {
        when
          "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_UNICAST'" {
          description
            "Include this container for IPv4 Unicast L3VPN specific
          configuration";
        }
        description
          "Unicast IPv4 L3VPN configuration options";
        uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common;
      }  // container l3vpn-ipv4-unicast
    }  // grouping bgp-common-mp-l3vpn-ipv4-unicast-group

    grouping bgp-common-mp-l3vpn-ipv6-unicast-group {
      description
        "Group for IPv6 Unicast L3VPN configuration options";
      container l3vpn-ipv6-unicast {
        when
          "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_UNICAST'" {
          description
            "Include this container for unicast IPv6 L3VPN specific
          configuration";
        }
        description
          "Unicast IPv6 L3VPN configuration options";
        uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common;
      }  // container l3vpn-ipv6-unicast
    }  // grouping bgp-common-mp-l3vpn-ipv6-unicast-group

    grouping bgp-common-mp-l3vpn-ipv4-multicast-group {
      description
        "Group for IPv4 L3VPN multicast configuration options";
      container l3vpn-ipv4-multicast {
        when
          "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_MULTICAST'" {
          description
            "Include this container for multicast IPv6 L3VPN specific
          configuration";
        }
        description
          "Multicast IPv4 L3VPN configuration options";
        uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common;
      }  // container l3vpn-ipv4-multicast
    }  // grouping bgp-common-mp-l3vpn-ipv4-multicast-group

    grouping bgp-common-mp-l3vpn-ipv6-multicast-group {
      description
        "Group for IPv6 L3VPN multicast configuration options";
      container l3vpn-ipv6-multicast {
        when
          "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_MULTICAST'" {
          description
            "Include this container for multicast IPv6 L3VPN specific
          configuration";
        }
        description
          "Multicast IPv6 L3VPN configuration options";
        uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common;
      }  // container l3vpn-ipv6-multicast
    }  // grouping bgp-common-mp-l3vpn-ipv6-multicast-group

    grouping bgp-common-mp-l2vpn-vpls-group {
      description
        "Group for BGP-signalled VPLS configuration options";
      container l2vpn-vpls {
        when
          "../afi-safi-name = 'oc-bgp-types:L2VPN_VPLS'" {
          description
            "Include this container for BGP-signalled VPLS specific
          configuration";
        }
        description
          "BGP-signalled VPLS configuration options";
        uses bgp-common-mp-l2vpn-common;
      }  // container l2vpn-vpls
    }  // grouping bgp-common-mp-l2vpn-vpls-group

    grouping bgp-common-mp-l2vpn-evpn-group {
      description
        "Group for BGP EVPN configuration options";
      container l2vpn-evpn {
        when
          "../afi-safi-name = 'oc-bgp-types:L2VPN_EVPN'" {
          description
            "Include this container for BGP EVPN specific
          configuration";
        }
        description
          "BGP EVPN configuration options";
        uses bgp-common-mp-l2vpn-common;
      }  // container l2vpn-evpn
    }  // grouping bgp-common-mp-l2vpn-evpn-group

    grouping bgp-common-mp-all-afi-safi-common {
      description
        "Grouping for configuration common to all AFI,SAFI";
      container prefix-limit {
        description
          "Configure the maximum number of prefixes that will be
        accepted from a peer";
        container config {
          description
            "Configuration parameters relating to the prefix
          limit for the AFI-SAFI";
          uses bgp-common-mp-all-afi-safi-common-prefix-limit-config;
        }  // container config

        container state {
          config false;
          description
            "State information relating to the prefix-limit for the
          AFI-SAFI";
          uses bgp-common-mp-all-afi-safi-common-prefix-limit-config;
        }  // container state
      }  // container prefix-limit
    }  // grouping bgp-common-mp-all-afi-safi-common

    grouping bgp-common-mp-ipv4-ipv6-unicast-common {
      description
        "Common configuration that is applicable for IPv4 and IPv6
      unicast";
      uses bgp-common-mp-all-afi-safi-common;

      container config {
        description
          "Configuration parameters for common IPv4 and IPv6 unicast
        AFI-SAFI options";
        uses bgp-common-mp-ipv4-ipv6-unicast-common-config;
      }  // container config

      container state {
        config false;
        description
          "State information for common IPv4 and IPv6 unicast
        parameters";
        uses bgp-common-mp-ipv4-ipv6-unicast-common-config;
      }  // container state
    }  // grouping bgp-common-mp-ipv4-ipv6-unicast-common

    grouping bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common {
      description
        "Common configuration applied across L3VPN for IPv4
       and IPv6";
      uses bgp-common-mp-all-afi-safi-common;
    }  // grouping bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common

    grouping bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common {
      description
        "Common configuration applied across L3VPN for IPv4
      and IPv6";
      uses bgp-common-mp-all-afi-safi-common;
    }  // grouping bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common

    grouping bgp-common-mp-l2vpn-common {
      description
        "Common configuration applied across L2VPN address
      families";
      uses bgp-common-mp-all-afi-safi-common;
    }  // grouping bgp-common-mp-l2vpn-common

    grouping bgp-common-mp-all-afi-safi-common-prefix-limit-config {
      description
        "Configuration parameters relating to prefix-limits for an
      AFI-SAFI";
      leaf max-prefixes {
        type uint32;
        description
          "Maximum number of prefixes that will be accepted
        from the neighbour";
      }

      leaf prevent-teardown {
        type boolean;
        default 'false';
        description
          "Do not tear down the BGP session when the maximum
        prefix limit is exceeded, but rather only log a
        warning. The default of this leaf is false, such
        that when it is not specified, the session is torn
        down.";
      }

      leaf shutdown-threshold-pct {
        type oc-types:percentage;
        description
          "Threshold on number of prefixes that can be received
        from a neighbour before generation of warning messages
        or log entries. Expressed as a percentage of
        max-prefixes";
      }

      leaf restart-timer {
        type decimal64 {
          fraction-digits 2;
        }
        units "seconds";
        description
          "Time interval in seconds after which the BGP session
        is re-established after being torn down due to exceeding
        the max-prefix limit.";
      }
    }  // grouping bgp-common-mp-all-afi-safi-common-prefix-limit-config

    grouping bgp-common-mp-ipv4-ipv6-unicast-common-config {
      description
        "Common configuration parameters for IPv4 and IPv6 Unicast
      address families";
      leaf send-default-route {
        type boolean;
        default "false";
        description
          "If set to true, send the default-route to the neighbour(s)";
      }
    }  // grouping bgp-common-mp-ipv4-ipv6-unicast-common-config
  }  // submodule openconfig-bgp-common-multiprotocol