summaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-network-instance-l3.yang
blob: d9dca40faf6b06be78e2f881d540c848cbcebf04 (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
module openconfig-network-instance-l3 {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/network-instance-l3";

  prefix "oc-ni-l3";

  // import some basic types
  import openconfig-extensions { prefix "oc-ext"; }
  import openconfig-types { prefix "octypes"; }

  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This module contains groupings which specifically relate to
    Layer 3 network instance configuration and operational state
    parameters.";

  oc-ext:openconfig-version "0.11.0";

  revision "2018-08-17" {
    description
      "Add a route limit for L3 network instances.";
    reference "0.11.0";
  }

  revision "2017-12-13" {
    description
      "Fix incorrect constraint on SR and MPLS containers";
    reference "0.9.0";
  }

  revision "2017-08-24" {
    description
      "Minor formatting fixes";
    reference "0.8.1";
  }

  revision "2017-02-28" {
    description
      "Add OSPFv2 to network instance";
    reference "0.8.0";
  }

  revision "2017-01-26" {
    description
      "Add policy forwarding to network instance";
    reference "0.7.0";
  }

  revision "2017-01-13" {
    description
      "Add AFT to the network instance";
    reference "0.6.0";
  }

  revision "2016-12-15" {
    description
      "Add segment routing to network instance";
    reference "0.5.0";
  }

  revision "2016-11-10" {
    description
      "Update model to include IS-IS.";
    reference "0.4.1";
  }

  revision "2016-09-28" {
    description
      "Change L2 instance to submodule; add MAC table";
    reference "0.3.0";
  }

  revision "2016-08-11" {
    description
      "Resolve repeated container names in routing protocols";
    reference "0.2.3";
  }

  revision "2016-07-08" {
    description
      "Updated with refactored routing protocol models";
    reference "0.2.1";
  }

  revision "2016-03-29" {
    description
      "Initial revision";
    reference "0.2.0";
  }

  revision "2016-03-14" {
    description
      "Initial revision";
    reference "0.1.0";
  }

  grouping l3ni-instance {
    description
      "Configuration and operational state parameters relevant
      to network instances that include a Layer 3 type";

  }

  grouping l3ni-instance-common-config {
    description
      "Configuration parameters that are common to L3 network
      instances other than the default instance";

    leaf-list enabled-address-families {
      type identityref {
        base octypes:ADDRESS_FAMILY;
      }
      description
        "The address families that are to be enabled for this
        network instance.";
    }
  }

  grouping l3ni-route-limit-structural {
    description
      "Configuration and state for the maximum number of routes
      that should be used by routing instance.";

    container route-limits {
      description
        "Configuration and operational state relating to the
        maximum number of routes for the address family that
        should be allowed within the Layer 3 network instance.

        When the specified value is reached, no further prefixes
        should be installed into the system's RIB from this network
        instance unless the warning only leaf is set. In this case,
        new routes should still be installed. If a alarm threshold
        is specified, then this should be used to generate
        alarms via telemetry for the network instance.";

      list route-limit {
        key "afi";

        description
          "A route limit applying to a particular address family.";

        leaf afi {
          type leafref {
            path "../config/afi";
          }
          description
            "Reference to the address family for which the route
            limit is being applied.";
        }

        container config {
          description
            "Configuration options relating to the route limit.";
          uses l3ni-route-limit-config;
        }

        container state {
          config false;
          description
            "Operational state parameters relating to the route limit.";
          uses l3ni-route-limit-config;
          uses l3ni-route-limit-state;
        }
      }
    }
  }

  grouping l3ni-route-limit-config {
    description
      "Configuration options relating to the route limit for a network
      instance.";

    leaf afi {
      type identityref {
        base octypes:ADDRESS_FAMILY;
      }
      description
        "The address family for which the route limit applies.";
    }

    leaf maximum {
      type uint32;
      description
        "The maximum number of routes for the address family. The
        system should not install more than maximum number of
        prefixes into the RIB unless the warning-only leaf is specified.";
    }

    leaf warning-only {
      type boolean;
      default false;
      description
        "When specified, the route limit specified is considered only as
        a warning - and routes should continue to be installed into the
        RIB over the limit specified in the maximum leaf.";
    }

    leaf alarm-threshold {
      type uint32;
      description
        "When specified, an alarm should be generated when the threshold
        number of installed routes is reached.";
    }
  }

  grouping l3ni-route-limit-state {
    description
      "Operational state relating to the route limit for a network
      instance.";

    leaf threshold-exceeded {
      type boolean;
      description
        "This leaf should be set to true in the case that the threshold
        number of routes has been exceeded.";
    }

    leaf installed-routes {
      type uint32;
      description
        "The current number of routes installed for the address family.";
    }
  }
}