--- /dev/null
+submodule ietf-bgp-neighbor {
+ yang-version "1.1";
+ belongs-to ietf-bgp {
+ prefix "bgp";
+ }
+
+ // Include the common submodule
+ include ietf-bgp-common;
+ include ietf-bgp-common-multiprotocol;
+ include ietf-bgp-peer-group;
+ include ietf-bgp-common-structure;
+
+ // 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 specific to the
+ neighbor context of the BGP module.";
+
+ revision "2019-06-13" {
+ description
+ "Initial Version";
+ reference
+ "RFC XXX, BGP Model for Service Provider Network.";
+ }
+
+ grouping bgp-neighbor-use-multiple-paths {
+ description
+ "Multi-path configuration and state applicable to a BGP
+ neighbor";
+
+ container use-multiple-paths {
+ description
+ "Parameters related to the use of multiple-paths for the same
+ NLRI when they are received only from this neighbor";
+
+ uses use-multiple-paths-config;
+
+ container ebgp {
+ description
+ "Multi-path configuration for eBGP";
+ uses use-multiple-paths-ebgp-as-options-config;
+ }
+ }
+ }
+
+ grouping bgp-neighbor-counters-message-types-state {
+ description
+ "Grouping of BGP message types, included for re-use across
+ counters";
+
+ leaf updates-received {
+ type uint64;
+ description
+ "Number of BGP UPDATE messages received from this neighbor.";
+ reference
+ "RFC 4273: bgpPeerInUpdates.";
+ }
+
+ leaf updates-sent {
+ type uint64;
+ description
+ "Number of BGP UPDATE messages sent to this neighbor";
+ reference
+ "RFC 4273 - bgpPeerOutUpdates";
+ }
+
+ leaf messages-received {
+ type uint64;
+ description
+ "Number of BGP messages received from thsi neighbor";
+ reference
+ "RFC 4273 - bgpPeerInTotalMessages";
+ }
+
+ leaf messages-sent {
+ type uint64;
+ description
+ "Number of BGP messages received from thsi neighbor";
+ reference
+ "RFC 4273 - bgpPeerOutTotalMessages";
+ }
+
+ leaf notification {
+ type uint64;
+ description
+ "Number of BGP NOTIFICATION messages indicating an error
+ condition has occurred exchanged.";
+ }
+ }
+
+ grouping bgp-neighbor-afi-safi-list {
+ description
+ "List of address-families associated with the BGP neighbor";
+
+ list afi-safi {
+ key "afi-safi-name";
+
+ description
+ "AFI, SAFI configuration available for the neighbor or
+ group";
+
+ uses mp-afi-safi-config;
+
+ leaf active {
+ type boolean;
+ config false;
+ description
+ "This value indicates whether a particular AFI-SAFI has
+ been successfully negotiated with the peer. An AFI-SAFI may
+ be enabled in the current running configuration, but a
+ session restart may be required in order to negotiate the
+ new capability.";
+ }
+
+ container prefixes {
+ config false;
+ description
+ "Prefix counters for the BGP session";
+
+ leaf received {
+ type uint32;
+ description
+ "The number of prefixes received from the neighbor";
+ }
+
+ leaf sent {
+ type uint32;
+ description
+ "The number of prefixes advertised to the neighbor";
+ }
+
+ leaf installed {
+ type uint32;
+ description
+ "The number of advertised prefixes installed in the
+ Loc-RIB";
+ }
+ }
+
+ container graceful-restart {
+ description
+ "Parameters relating to BGP graceful-restart";
+
+ uses mp-afi-safi-graceful-restart-config;
+
+ leaf received {
+ type boolean;
+ config false;
+ description
+ "This leaf indicates whether the neighbor advertised the
+ ability to support graceful-restart for this AFI-SAFI";
+ }
+
+ leaf advertised {
+ type boolean;
+ config false;
+ description
+ "This leaf indicates whether the ability to support
+ graceful-restart has been advertised to the peer";
+ }
+ }
+
+ uses mp-all-afi-safi-list-contents;
+ uses bgp-neighbor-use-multiple-paths;
+ }
+ }
+}