This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
ip_iep_oper.go
372 lines (302 loc) · 15.1 KB
/
ip_iep_oper.go
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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
// This module contains a collection of YANG definitions
// for Cisco IOS-XR ip-iep package operational data.
//
// This module contains definitions
// for the following management objects:
// explicit-paths: Configured IP explicit paths
//
// Copyright (c) 2013-2018 by Cisco Systems, Inc.
// All rights reserved.
package ip_iep_oper
import (
"fmt"
"github.com/CiscoDevNet/ydk-go/ydk"
"github.com/CiscoDevNet/ydk-go/ydk/types"
"github.com/CiscoDevNet/ydk-go/ydk/types/yfilter"
"github.com/CiscoDevNet/ydk-go/ydk/models/cisco_ios_xr"
"reflect"
)
func init() {
ydk.YLogDebug(fmt.Sprintf("Registering top level entities for package ip_iep_oper"))
ydk.RegisterEntity("{http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iep-oper explicit-paths}", reflect.TypeOf(ExplicitPaths{}))
ydk.RegisterEntity("Cisco-IOS-XR-ip-iep-oper:explicit-paths", reflect.TypeOf(ExplicitPaths{}))
}
// IepStatus represents Status of the path
type IepStatus string
const (
// Status is enabled
IepStatus_enabled IepStatus = "enabled"
// Status is disabled
IepStatus_disabled IepStatus = "disabled"
)
// IepAddress represents Address types
type IepAddress string
const (
// Address type is next
IepAddress_next IepAddress = "next"
// Address type is exclude
IepAddress_exclude IepAddress = "exclude"
// Address type is exclude SRLG
IepAddress_exclude_srlg IepAddress = "exclude-srlg"
)
// IepHop represents Hop types of the next-address configured
type IepHop string
const (
// Hop type is strict
IepHop_strict IepHop = "strict"
// Hop type is loose
IepHop_loose IepHop = "loose"
)
// ExplicitPaths
// Configured IP explicit paths
type ExplicitPaths struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// List of configured IP explicit path identifiers, this corresponds to
// mplsTunnelHopTable in TE MIB.
Identifiers ExplicitPaths_Identifiers
// List of configured IP explicit path names, this corresponds to
// mplsTunnelHopTable in TE MIB.
Names ExplicitPaths_Names
}
func (explicitPaths *ExplicitPaths) GetEntityData() *types.CommonEntityData {
explicitPaths.EntityData.YFilter = explicitPaths.YFilter
explicitPaths.EntityData.YangName = "explicit-paths"
explicitPaths.EntityData.BundleName = "cisco_ios_xr"
explicitPaths.EntityData.ParentYangName = "Cisco-IOS-XR-ip-iep-oper"
explicitPaths.EntityData.SegmentPath = "Cisco-IOS-XR-ip-iep-oper:explicit-paths"
explicitPaths.EntityData.AbsolutePath = explicitPaths.EntityData.SegmentPath
explicitPaths.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
explicitPaths.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
explicitPaths.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
explicitPaths.EntityData.Children = types.NewOrderedMap()
explicitPaths.EntityData.Children.Append("identifiers", types.YChild{"Identifiers", &explicitPaths.Identifiers})
explicitPaths.EntityData.Children.Append("names", types.YChild{"Names", &explicitPaths.Names})
explicitPaths.EntityData.Leafs = types.NewOrderedMap()
explicitPaths.EntityData.YListKeys = []string {}
return &(explicitPaths.EntityData)
}
// ExplicitPaths_Identifiers
// List of configured IP explicit path identifiers,
// this corresponds to mplsTunnelHopTable in TE MIB
type ExplicitPaths_Identifiers struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// IP explicit path configured for a particular identifier. The type is slice
// of ExplicitPaths_Identifiers_Identifier.
Identifier []*ExplicitPaths_Identifiers_Identifier
}
func (identifiers *ExplicitPaths_Identifiers) GetEntityData() *types.CommonEntityData {
identifiers.EntityData.YFilter = identifiers.YFilter
identifiers.EntityData.YangName = "identifiers"
identifiers.EntityData.BundleName = "cisco_ios_xr"
identifiers.EntityData.ParentYangName = "explicit-paths"
identifiers.EntityData.SegmentPath = "identifiers"
identifiers.EntityData.AbsolutePath = "Cisco-IOS-XR-ip-iep-oper:explicit-paths/" + identifiers.EntityData.SegmentPath
identifiers.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
identifiers.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
identifiers.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
identifiers.EntityData.Children = types.NewOrderedMap()
identifiers.EntityData.Children.Append("identifier", types.YChild{"Identifier", nil})
for i := range identifiers.Identifier {
identifiers.EntityData.Children.Append(types.GetSegmentPath(identifiers.Identifier[i]), types.YChild{"Identifier", identifiers.Identifier[i]})
}
identifiers.EntityData.Leafs = types.NewOrderedMap()
identifiers.EntityData.YListKeys = []string {}
return &(identifiers.EntityData)
}
// ExplicitPaths_Identifiers_Identifier
// IP explicit path configured for a particular
// identifier
type ExplicitPaths_Identifiers_Identifier struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Identifier ID. The type is interface{} with range:
// 0..4294967295.
IdentifierId interface{}
// Status of the path. The type is IepStatus.
Status interface{}
// List of IP addresses configured in the explicit path. The type is slice of
// ExplicitPaths_Identifiers_Identifier_Address.
Address []*ExplicitPaths_Identifiers_Identifier_Address
}
func (identifier *ExplicitPaths_Identifiers_Identifier) GetEntityData() *types.CommonEntityData {
identifier.EntityData.YFilter = identifier.YFilter
identifier.EntityData.YangName = "identifier"
identifier.EntityData.BundleName = "cisco_ios_xr"
identifier.EntityData.ParentYangName = "identifiers"
identifier.EntityData.SegmentPath = "identifier" + types.AddKeyToken(identifier.IdentifierId, "identifier-id")
identifier.EntityData.AbsolutePath = "Cisco-IOS-XR-ip-iep-oper:explicit-paths/identifiers/" + identifier.EntityData.SegmentPath
identifier.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
identifier.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
identifier.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
identifier.EntityData.Children = types.NewOrderedMap()
identifier.EntityData.Children.Append("address", types.YChild{"Address", nil})
for i := range identifier.Address {
types.SetYListKey(identifier.Address[i], i)
identifier.EntityData.Children.Append(types.GetSegmentPath(identifier.Address[i]), types.YChild{"Address", identifier.Address[i]})
}
identifier.EntityData.Leafs = types.NewOrderedMap()
identifier.EntityData.Leafs.Append("identifier-id", types.YLeaf{"IdentifierId", identifier.IdentifierId})
identifier.EntityData.Leafs.Append("status", types.YLeaf{"Status", identifier.Status})
identifier.EntityData.YListKeys = []string {"IdentifierId"}
return &(identifier.EntityData)
}
// ExplicitPaths_Identifiers_Identifier_Address
// List of IP addresses configured in the explicit
// path
type ExplicitPaths_Identifiers_Identifier_Address struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// Index number at which the path entry is inserted or modified. The type is
// interface{} with range: 0..4294967295.
Index interface{}
// Interface Index of the path. The type is interface{} with range:
// 0..4294967295.
IfIndex interface{}
// Specifies the address type. The type is IepAddress.
AddressType interface{}
// Specifies the next unicast address in the path as a strict or loose hop.
// The type is IepHop.
HopType interface{}
// IPv4 unicast address. The type is string with pattern:
// (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?.
Address interface{}
// MPLS label. The type is interface{} with range: 0..4294967295.
MplsLabel interface{}
}
func (address *ExplicitPaths_Identifiers_Identifier_Address) GetEntityData() *types.CommonEntityData {
address.EntityData.YFilter = address.YFilter
address.EntityData.YangName = "address"
address.EntityData.BundleName = "cisco_ios_xr"
address.EntityData.ParentYangName = "identifier"
address.EntityData.SegmentPath = "address" + types.AddNoKeyToken(address)
address.EntityData.AbsolutePath = "Cisco-IOS-XR-ip-iep-oper:explicit-paths/identifiers/identifier/" + address.EntityData.SegmentPath
address.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
address.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
address.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
address.EntityData.Children = types.NewOrderedMap()
address.EntityData.Leafs = types.NewOrderedMap()
address.EntityData.Leafs.Append("index", types.YLeaf{"Index", address.Index})
address.EntityData.Leafs.Append("if-index", types.YLeaf{"IfIndex", address.IfIndex})
address.EntityData.Leafs.Append("address-type", types.YLeaf{"AddressType", address.AddressType})
address.EntityData.Leafs.Append("hop-type", types.YLeaf{"HopType", address.HopType})
address.EntityData.Leafs.Append("address", types.YLeaf{"Address", address.Address})
address.EntityData.Leafs.Append("mpls-label", types.YLeaf{"MplsLabel", address.MplsLabel})
address.EntityData.YListKeys = []string {}
return &(address.EntityData)
}
// ExplicitPaths_Names
// List of configured IP explicit path names, this
// corresponds to mplsTunnelHopTable in TE MIB
type ExplicitPaths_Names struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// IP explicit path configured for a particular path name. The type is slice
// of ExplicitPaths_Names_Name.
Name []*ExplicitPaths_Names_Name
}
func (names *ExplicitPaths_Names) GetEntityData() *types.CommonEntityData {
names.EntityData.YFilter = names.YFilter
names.EntityData.YangName = "names"
names.EntityData.BundleName = "cisco_ios_xr"
names.EntityData.ParentYangName = "explicit-paths"
names.EntityData.SegmentPath = "names"
names.EntityData.AbsolutePath = "Cisco-IOS-XR-ip-iep-oper:explicit-paths/" + names.EntityData.SegmentPath
names.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
names.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
names.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
names.EntityData.Children = types.NewOrderedMap()
names.EntityData.Children.Append("name", types.YChild{"Name", nil})
for i := range names.Name {
names.EntityData.Children.Append(types.GetSegmentPath(names.Name[i]), types.YChild{"Name", names.Name[i]})
}
names.EntityData.Leafs = types.NewOrderedMap()
names.EntityData.YListKeys = []string {}
return &(names.EntityData)
}
// ExplicitPaths_Names_Name
// IP explicit path configured for a particular
// path name
type ExplicitPaths_Names_Name struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Path name. The type is string with pattern:
// [\w\-\.:,_@#%$\+=\|;]+.
PathName interface{}
// Status of the path. The type is IepStatus.
Status interface{}
// List of IP addresses configured in the explicit path. The type is slice of
// ExplicitPaths_Names_Name_Address.
Address []*ExplicitPaths_Names_Name_Address
}
func (name *ExplicitPaths_Names_Name) GetEntityData() *types.CommonEntityData {
name.EntityData.YFilter = name.YFilter
name.EntityData.YangName = "name"
name.EntityData.BundleName = "cisco_ios_xr"
name.EntityData.ParentYangName = "names"
name.EntityData.SegmentPath = "name" + types.AddKeyToken(name.PathName, "path-name")
name.EntityData.AbsolutePath = "Cisco-IOS-XR-ip-iep-oper:explicit-paths/names/" + name.EntityData.SegmentPath
name.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
name.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
name.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
name.EntityData.Children = types.NewOrderedMap()
name.EntityData.Children.Append("address", types.YChild{"Address", nil})
for i := range name.Address {
types.SetYListKey(name.Address[i], i)
name.EntityData.Children.Append(types.GetSegmentPath(name.Address[i]), types.YChild{"Address", name.Address[i]})
}
name.EntityData.Leafs = types.NewOrderedMap()
name.EntityData.Leafs.Append("path-name", types.YLeaf{"PathName", name.PathName})
name.EntityData.Leafs.Append("status", types.YLeaf{"Status", name.Status})
name.EntityData.YListKeys = []string {"PathName"}
return &(name.EntityData)
}
// ExplicitPaths_Names_Name_Address
// List of IP addresses configured in the explicit
// path
type ExplicitPaths_Names_Name_Address struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// Index number at which the path entry is inserted or modified. The type is
// interface{} with range: 0..4294967295.
Index interface{}
// Interface Index of the path. The type is interface{} with range:
// 0..4294967295.
IfIndex interface{}
// Specifies the address type. The type is IepAddress.
AddressType interface{}
// Specifies the next unicast address in the path as a strict or loose hop.
// The type is IepHop.
HopType interface{}
// IPv4 unicast address. The type is string with pattern:
// (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?.
Address interface{}
// MPLS label. The type is interface{} with range: 0..4294967295.
MplsLabel interface{}
}
func (address *ExplicitPaths_Names_Name_Address) GetEntityData() *types.CommonEntityData {
address.EntityData.YFilter = address.YFilter
address.EntityData.YangName = "address"
address.EntityData.BundleName = "cisco_ios_xr"
address.EntityData.ParentYangName = "name"
address.EntityData.SegmentPath = "address" + types.AddNoKeyToken(address)
address.EntityData.AbsolutePath = "Cisco-IOS-XR-ip-iep-oper:explicit-paths/names/name/" + address.EntityData.SegmentPath
address.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
address.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
address.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
address.EntityData.Children = types.NewOrderedMap()
address.EntityData.Leafs = types.NewOrderedMap()
address.EntityData.Leafs.Append("index", types.YLeaf{"Index", address.Index})
address.EntityData.Leafs.Append("if-index", types.YLeaf{"IfIndex", address.IfIndex})
address.EntityData.Leafs.Append("address-type", types.YLeaf{"AddressType", address.AddressType})
address.EntityData.Leafs.Append("hop-type", types.YLeaf{"HopType", address.HopType})
address.EntityData.Leafs.Append("address", types.YLeaf{"Address", address.Address})
address.EntityData.Leafs.Append("mpls-label", types.YLeaf{"MplsLabel", address.MplsLabel})
address.EntityData.YListKeys = []string {}
return &(address.EntityData)
}