summaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-bgp-peer-group.yang
blob: b1ba986207a5fa6baeea2e025d5cdff497518871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
submodule openconfig-bgp-peer-group {

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

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

  // Include the common submodule
  include openconfig-bgp-common;
  include openconfig-bgp-common-multiprotocol;
  include openconfig-bgp-common-structure;

  // meta
  organization
    "OpenConfig working group";

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

  description
    "This sub-module contains groupings that are specific to the
    peer-group context of the OpenConfig BGP module.";

  oc-ext:openconfig-version "5.0.1";

  revision "2018-08-20" {
    description
      "Correct description of AFI-SAFI enabled leaf.";
    reference "5.0.1";
  }

  revision "2018-04-11" {
    description
      "Correct naming of BGP maximum prefix warning percentage leaf.";
    reference "5.0.0";
  }

  revision "2018-03-20" {
    description
      "Added SR-TE policy SAFI";
    reference "4.1.0";
  }

  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";
  }

  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";

      leaf afi-safi-name {
        type leafref {
          path "../config/afi-safi-name";
        }
        description
          "Reference to the AFI-SAFI name used as a key
          for the AFI-SAFI list";
      }

      container config {
        description
          "Configuration parameters for the AFI-SAFI";
        uses bgp-common-mp-afi-safi-config;
      }
      container state {
        config false;
        description
          "State information relating to the AFI-SAFI";
        uses bgp-common-mp-afi-safi-config;
      }

      container graceful-restart {
        description
          "Parameters relating to BGP graceful-restart";
        container config {
          description
            "Configuration options for BGP graceful-restart";
          uses bgp-common-mp-afi-safi-graceful-restart-config;
        }
        container state {
          config false;
          description
            "State information for BGP graceful-restart";
          uses bgp-common-mp-afi-safi-graceful-restart-config;
        }
      }

      uses bgp-common-structure-neighbor-group-add-paths;
      uses bgp-common-global-group-use-multiple-paths;
      uses bgp-common-mp-all-afi-safi-list-contents;
    }
  }

  grouping bgp-peer-group-base {
    description
      "Parameters related to a BGP group";

    container config {
      description
        "Configuration parameters relating to the BGP neighbor or
        group";
      uses bgp-peer-group-config;
      uses bgp-common-neighbor-group-config;
    }
    container state {
      config false;
      description
        "State information relating to the BGP peer-group";
      uses bgp-peer-group-config;
      uses bgp-common-neighbor-group-config;
      uses bgp-common-state;
    }

    container timers {
      description
        "Timers related to a BGP peer-group";

      container config {
        description
          "Configuration parameters relating to timers used for the
          BGP neighbor or peer group";
        uses bgp-common-neighbor-group-timers-config;
      }
      container state {
        config false;
        description
          "State information relating to the timers used for the BGP
         group";
        uses bgp-common-neighbor-group-timers-config;
      }
    }

    container transport {
      description
        "Transport session parameters for the BGP peer-group";

      container config {
        description
          "Configuration parameters relating to the transport
          session(s) used for the BGP neighbor or group";
        uses bgp-common-neighbor-group-transport-config;
      }
      container state {
        config false;
        description
          "State information relating to the transport session(s)
          used for the BGP neighbor or group";
        uses bgp-common-neighbor-group-transport-config;
      }
    }

    container error-handling {
      description
        "Error handling parameters used for the BGP peer-group";

      container config {
        description
          "Configuration parameters enabling or modifying the
          behavior or enhanced error handling mechanisms for the BGP
          group";
        uses bgp-common-neighbor-group-error-handling-config;
      }
      container state {
        config false;
        description
          "State information relating to enhanced error handling
          mechanisms for the BGP group";
        uses bgp-common-neighbor-group-error-handling-config;
      }
    }

    container graceful-restart {
      description
        "Parameters relating the graceful restart mechanism for BGP";
      container config {
        description
          "Configuration parameters relating to graceful-restart";
        uses bgp-common-graceful-restart-config;
      }
      container state {
        config false;
        description
          "State information associated with graceful-restart";
        uses bgp-common-graceful-restart-config;
      }
    }

    uses bgp-common-structure-neighbor-group-logging-options;
    uses bgp-common-structure-neighbor-group-ebgp-multihop;
    uses bgp-common-structure-neighbor-group-route-reflector;
    uses bgp-common-structure-neighbor-group-as-path-options;
    uses bgp-common-global-group-use-multiple-paths;
    uses oc-rpol:apply-policy-group;

    container afi-safis {
      description
        "Per-address-family configuration parameters associated with
        thegroup";
      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";

    leaf peer-group-name {
      type leafref {
        path "../config/peer-group-name";
      }
      description
        "Reference to the name of the BGP peer-group used as a
        key in the peer-group list";
      }

      uses bgp-peer-group-base;
    }
  }

}