summaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-isis-types.yang
blob: cdfab1f3390ef07d0e62291e71c18b5aeb8724bf (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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
module openconfig-isis-types {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/isis-types";

  prefix "oc-isis-types";

  import openconfig-extensions { prefix oc-ext; }

  // meta
  organization "OpenConfig working group";

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

  description
    "This module contains general data definitions for use in ISIS YANG
    model.";

  oc-ext:openconfig-version "0.4.0";

  revision "2018-05-14" {
    description
      "Update LSDB model to correct Extended IS reach TLV
      bug. This change is backwards incompatible due to
      adding an additional level of hierarchy to support
      multiple instances of the TLV.";
    reference "0.4.0";
  }

  revision "2017-07-26" {
    description
      "Update LSDB and fix bugs.";
    reference "0.3.2";
  }

  revision "2017-05-15" {
    description
      "Refactor LSDB.";
    reference "0.3.0";
  }

  revision "2017-01-13" {
    description
      "Remove top-level /isis container";
    reference "0.2.1";
  }

  revision "2016-12-15" {
    description
      "Add segment routing to IS-IS module";
    reference "0.2.0";
  }

  revision "2016-10-18" {
    description
      "Initial revision of IS-IS models.";
    reference "0.1.0";
  }

  // identity statements
  identity OVERLOAD_RESET_TRIGGER_TYPE {
    description
      "Base identify type for triggers that reset Overload Bit";
  }

  identity WAIT_FOR_BGP {
    base OVERLOAD_RESET_TRIGGER_TYPE;
    description
      "Base identity type for resetting Overload Bit when BGP has converged. ";
  }

  identity WAIT_FOR_SYSTEM {
    base OVERLOAD_RESET_TRIGGER_TYPE;
    description
      "Base identity type for resetting Overload Bit when system resources have
      been restored. ";
  }

  identity MT_TYPE {
    description
      "Base identify type for multi-topology";
  }

  identity SAFI_TYPE {
    description
      "Base identify type for SAFI";
  }

  identity AFI_TYPE {
    description
      "Base identify type for AFI";
  }

  identity AFI_SAFI_TYPE {
    description
      "Base identify type for AFI/SAFI";
  }

  identity IPV4_UNICAST {
    base AFI_SAFI_TYPE;
    description
      "Base identify type for IPv4 Unicast address family";
  }

  identity IPV6_MULTICAST {
    base AFI_SAFI_TYPE;
    description
      "Base identify type for IPv6 multicast address family";
  }

  identity IPV4_MULTICAST {
    base AFI_SAFI_TYPE;
    description
      "Base identify type for IPv4 multicast address family";
  }

  identity IPV6_UNICAST {
    base AFI_SAFI_TYPE;
    description
      "Base identify type for IPv6 unicast address family";
  }

  identity UNICAST {
    base SAFI_TYPE;
    description
      "Base identify type for IPv4 Unicast address family";
  }

  identity MULTICAST {
    base SAFI_TYPE;
    description
      "Base identify type for IPv6 multicast address family";
  }

  identity IPV4 {
    base AFI_TYPE;
    description
      "Base identify type for IPv4 address family";
  }

  identity IPV6 {
    base AFI_TYPE;
    description
      "Base identify type for IPv6 address family";
  }

  // typedef statements
  typedef level-type {
    type enumeration {
      enum LEVEL_1 {
        description "This enum describes ISIS level 1";
      }
      enum LEVEL_2 {
        description "This enum describes ISIS level 2";
      }
      enum LEVEL_1_2 {
        description "This enum describes ISIS level 1-2";
      }
    }
    description
        "This type defines ISIS level types";
  }

  typedef level-number {
    type uint8 {
      range "1..2";
    }
    description
        "This type defines ISIS level.";
  }

  typedef adaptive-timer-type {
    type enumeration {
      enum LINEAR {
        description "This enum describes linear algorithm timer";
      }
      enum EXPONENTIAL {
        description "This enum describes exponential algorithm timer";
      }
    }
    description
        "This type defines ISIS adaptive timer types";
  }

  typedef hello-padding-type {
    type enumeration {
      enum STRICT {
        description "This enum describes strict padding";
      }
      enum LOOSE {
        description "This enum describes loose padding";
      }
      enum ADAPTIVE {
        description "This enum describes adaptive padding";
      }
      enum DISABLE {
        description "This enum disables padding";
      }
    }
    description
        "This type defines ISIS hello padding type";
  }

  typedef circuit-type {
    type enumeration {
      enum POINT_TO_POINT {
        description "This enum describes a point-to-point interface";
      }
      enum BROADCAST {
        description "This enum describes a broadcast interface";
      }
    }
    description
        "This type defines ISIS interface types ";
  }

  typedef metric-type {
    type enumeration {
      enum INTERNAL {
        description "This enum describes internal route type";
      }
      enum EXTERNAL {
        description "This enum describes external route type";
      }
    }
    description
      "This type defines ISIS metric type";
  }

  typedef wide-metric {
    type uint32 {
      range "1..16777215";
    }
    description
        "This type defines ISIS wide metric.";
  }

  typedef narrow-metric {
    type uint8 {
      range "1..63";
    }
    description
        "This type defines ISIS narrow metric.";
  }

  typedef metric-style {
    type enumeration {
      enum NARROW_METRIC {
        description
                "This enum describes narrow metric style";
        reference "RFC1195";
      }
      enum WIDE_METRIC {
        description
                "This enum describes wide metric style";
        reference "RFC5305";
      }
    }
    description
        "This type defines ISIS metric styles";
  }

  typedef isis-interface-adj-state {
    type enumeration {
      enum UP {
        description
          "This state describes that adjacency is established.";
      }
      enum DOWN {
        description
          "This state describes that adjacency is NOT established.";
      }
      enum INIT {
        description
          "This state describes that adjacency is establishing.";
      }
      enum FAILED {
        description
          "This state describes that adjacency is failed.";
      }
    }
    description
      "This type defines the state of the interface.";
  }

  typedef net {
    type string {
      pattern '^[a-fA-F0-9]{2}(\.[a-fA-F0-9]{4}){3,9}\.[a-fA-F0-9]{2}$';
    }
    description
      "This type defines OSI NET address. A NET should should be in
      the form xx.yyyy.yyyy.yyyy.00 with up to 9 sets of yyyy.";
  }

  typedef area-address {
    type string {
      pattern '^[0-9A-Fa-f]{2}\.([0-9A-Fa-f]{4}\.){0,3}$';
    }
    description
        "This type defines the ISIS area address.";
  }

  typedef system-id {
    type string {
      pattern '^[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}$';
    }
    description
      "This type defines ISIS system id using pattern, system id looks
       like : 0143.0438.AeF0";
  }

  typedef extended-circuit-id {
    type uint32;
    description
      "This type defines interface circuit ID.";
  }

  typedef lsp-id {
    type string {
      pattern
            '^[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]'
      +      '{4}\.[0-9][0-9]-[0-9][0-9]$';
    }
    description
      "This type defines ISIS LSP ID. ISIS LSP ID type should be in
      the form of xxxx.xxxx.xxxx.xx-xx";
  }
  typedef snpa {
    type string {
      length "0 .. 20";
    }
    description
      "This type defines Subnetwork Point of Attachment format.";
  }
}