--- /dev/null
+submodule ietf-bgp-common-structure {
+ yang-version "1.1";
+ belongs-to ietf-bgp {
+ prefix "bgp";
+ }
+
+ import ietf-bgp-types { prefix bt; }
+ import ietf-routing-policy { prefix rpol; }
+ include ietf-bgp-common-multiprotocol;
+ include ietf-bgp-common;
+
+ // meta
+ organization
+ "IETF IDR Working Group";
+
+ contact
+ "WG Web: <http://tools.ietf.org/wg/idr>
+ WG List: <idr@ietf.org>
+
+ Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
+ Keyur Patel (keyur at arrcus.com),
+
+ Susan Hares (shares at ndzh.com)";
+
+ description
+ "This sub-module contains groupings that are common across
+ multiple BGP contexts and provide structure around other
+ primitive groupings.";
+
+
+ revision "2019-06-13" {
+ description
+ "Initial Version";
+ reference
+ "RFC XXX, BGP Model for Service Provider Network.";
+ }
+
+ grouping structure-neighbor-group-ebgp-multihop {
+ description
+ "Structural grouping used to include eBGP multi-hop
+ configuration and state for both BGP neighbors and peer
+ groups";
+
+ container ebgp-multihop {
+ description
+ "eBGP multi-hop parameters for the BGPgroup";
+
+ leaf enabled {
+ type boolean;
+ default "false";
+ description
+ "When enabled the referenced group or neighbors are
+ permitted to be indirectly connected - including cases
+ where the TTL can be decremented between the BGP peers";
+ }
+
+ leaf multihop-ttl {
+ type uint8;
+ description
+ "Time-to-live value to use when packets are sent to the
+ referenced group or neighbors and ebgp-multihop is
+ enabled";
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-route-reflector {
+ description
+ "Structural grouping used to include route reflector
+ configuration and state for both BGP neighbors and peer
+
+ groups";
+
+ container route-reflector {
+ description
+ "Route reflector parameters for the BGPgroup";
+ reference
+ "RFC 4456: BGP Route Reflection.";
+
+ leaf route-reflector-cluster-id {
+ type bt:rr-cluster-id-type;
+ description
+ "route-reflector cluster id to use when local router is
+ configured as a route reflector. Commonly set at the
+ group level, but allows a different cluster id to be set
+ for each neighbor.";
+ }
+
+ leaf route-reflector-client {
+ type boolean;
+ default "false";
+ description
+ "Configure the neighbor as a route reflector client.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-as-path-options {
+ description
+ "Structural grouping used to include AS_PATH manipulation
+ configuration and state for both BGP neighbors and peer
+ groups";
+
+ container as-path-options {
+ description
+ "AS_PATH manipulation parameters for the BGP neighbor or
+ group";
+ leaf allow-own-as {
+ type uint8;
+ default 0;
+ description
+ "Specify the number of occurrences of the local BGP
+ speaker's AS that can occur within the AS_PATH before it
+ is rejected.";
+ }
+
+ leaf replace-peer-as {
+ type boolean;
+ default "false";
+
+ description
+ "Replace occurrences of the peer's AS in the AS_PATH with
+ the local autonomous system number";
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-add-paths {
+ description
+ "Structural grouping used to include ADD-PATHs configuration
+ and state for both BGP neighbors and peer groups";
+
+ container add-paths {
+ description
+ "Parameters relating to the advertisement and receipt of
+ multiple paths for a single NLRI (add-paths)";
+
+ leaf receive {
+ type boolean;
+ default false;
+ description
+ "Enable ability to receive multiple path advertisements for
+ an NLRI from the neighbor or group";
+ }
+
+ leaf send-max {
+ type uint8;
+ description
+ "The maximum number of paths to advertise to neighbors for
+ a single NLRI";
+ }
+ leaf eligible-prefix-policy {
+ type leafref {
+ path "/rpol:routing-policy/rpol:policy-definitions/" +
+ "rpol:policy-definition/rpol:name";
+ }
+ description
+ "A reference to a routing policy which can be used to
+ restrict the prefixes for which add-paths is enabled";
+ }
+ }
+ }
+}