--- /dev/null
+submodule ietf-bgp-peer-group {
+
+ yang-version "1.1";
+ belongs-to ietf-bgp {
+ prefix "bgp";
+ }
+
+ import ietf-routing-policy {
+ prefix rpol;
+ }
+
+ // Include the common submodule
+ include ietf-bgp-common;
+ include ietf-bgp-common-multiprotocol;
+ 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
+ peer-group context of the OpenConfig BGP module.";
+
+ revision "2019-06-13" {
+ description
+ "Initial Version";
+ reference
+ "RFC XXX, BGP Model for Service Provider Network.";
+ }
+
+ grouping bgp-peer-group-config {
+ description
+ "Configuration parameters relating to a base BGP peer group
+ that are not also applicable to any other context (e.g.,
+ neighbor)";
+
+ leaf peer-group-name {
+ type string;
+ description
+ "Name of the BGP peer-group";
+ }
+
+ }
+
+ grouping bgp-peer-group-afi-safi-list {
+ description
+ "List of address-families associated with the BGP peer-group";
+
+ list afi-safi {
+ key "afi-safi-name";
+
+ description
+ "AFI, SAFI configuration available for the
+ neighbour or group";
+
+ uses mp-afi-safi-config;
+
+ container graceful-restart {
+ description
+ "Parameters relating to BGP graceful-restart";
+
+ uses mp-afi-safi-graceful-restart-config;
+ }
+
+ uses route-selection-options;
+ uses global-group-use-multiple-paths;
+ uses mp-all-afi-safi-list-contents;
+ }
+ }
+
+ grouping bgp-peer-group-base {
+ description
+ "Parameters related to a BGP group.";
+
+ uses bgp-peer-group-config;
+ uses neighbor-group-config;
+ uses state;
+
+ container timers {
+ description
+ "Timers related to a BGP peer-group.";
+
+ uses neighbor-group-timers-config;
+ }
+
+ container transport {
+ description
+ "Transport session parameters for the BGP peer-group.";
+
+ uses neighbor-group-transport-config;
+
+ }
+
+ container graceful-restart {
+ description
+ "Parameters relating the graceful restart mechanism for BGP.";
+
+ uses graceful-restart-config;
+ }
+
+ uses structure-neighbor-group-ebgp-multihop;
+ uses structure-neighbor-group-route-reflector;
+ uses structure-neighbor-group-as-path-options;
+ uses structure-neighbor-group-add-paths;
+ uses global-group-use-multiple-paths;
+ uses rpol:apply-policy-group;
+
+ container afi-safis {
+ description
+ "Per-address-family configuration parameters associated with
+ the group.";
+ uses bgp-peer-group-afi-safi-list;
+ }
+ }
+
+ grouping bgp-peer-group-list {
+ description
+ "The list of BGP peer groups";
+
+ list peer-group {
+ key "peer-group-name";
+ description
+ "List of BGP peer-groups configured on the local system -
+ uniquely identified by peer-group name";
+
+ uses bgp-peer-group-base;
+ }
+ }
+}