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
/
asr9k_lc_pwrglide_cfg.go
165 lines (136 loc) · 7.26 KB
/
asr9k_lc_pwrglide_cfg.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
// This module contains a collection of YANG definitions
// for Cisco IOS-XR asr9k-lc-pwrglide package configuration.
//
// This module contains definitions
// for the following management objects:
// hardware-module-port-mode: HW module port-mode config
//
// Copyright (c) 2013-2018 by Cisco Systems, Inc.
// All rights reserved.
package asr9k_lc_pwrglide_cfg
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 asr9k_lc_pwrglide_cfg"))
ydk.RegisterEntity("{http://cisco.com/ns/yang/Cisco-IOS-XR-asr9k-lc-pwrglide-cfg hardware-module-port-mode}", reflect.TypeOf(HardwareModulePortMode{}))
ydk.RegisterEntity("Cisco-IOS-XR-asr9k-lc-pwrglide-cfg:hardware-module-port-mode", reflect.TypeOf(HardwareModulePortMode{}))
}
// HardwareModulePortMode
// HW module port-mode config
type HardwareModulePortMode struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Active or Pre configuration. The type is slice of
// HardwareModulePortMode_ConfigMode.
ConfigMode []*HardwareModulePortMode_ConfigMode
}
func (hardwareModulePortMode *HardwareModulePortMode) GetEntityData() *types.CommonEntityData {
hardwareModulePortMode.EntityData.YFilter = hardwareModulePortMode.YFilter
hardwareModulePortMode.EntityData.YangName = "hardware-module-port-mode"
hardwareModulePortMode.EntityData.BundleName = "cisco_ios_xr"
hardwareModulePortMode.EntityData.ParentYangName = "Cisco-IOS-XR-asr9k-lc-pwrglide-cfg"
hardwareModulePortMode.EntityData.SegmentPath = "Cisco-IOS-XR-asr9k-lc-pwrglide-cfg:hardware-module-port-mode"
hardwareModulePortMode.EntityData.AbsolutePath = hardwareModulePortMode.EntityData.SegmentPath
hardwareModulePortMode.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
hardwareModulePortMode.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
hardwareModulePortMode.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
hardwareModulePortMode.EntityData.Children = types.NewOrderedMap()
hardwareModulePortMode.EntityData.Children.Append("config-mode", types.YChild{"ConfigMode", nil})
for i := range hardwareModulePortMode.ConfigMode {
hardwareModulePortMode.EntityData.Children.Append(types.GetSegmentPath(hardwareModulePortMode.ConfigMode[i]), types.YChild{"ConfigMode", hardwareModulePortMode.ConfigMode[i]})
}
hardwareModulePortMode.EntityData.Leafs = types.NewOrderedMap()
hardwareModulePortMode.EntityData.YListKeys = []string {}
return &(hardwareModulePortMode.EntityData)
}
// HardwareModulePortMode_ConfigMode
// Active or Pre configuration
type HardwareModulePortMode_ConfigMode struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. act- or pre-config. The type is string with
// pattern: [\w\-\.:,_@#%$\+=\|;]+.
Id1 interface{}
// A node. The type is slice of HardwareModulePortMode_ConfigMode_Node.
Node []*HardwareModulePortMode_ConfigMode_Node
}
func (configMode *HardwareModulePortMode_ConfigMode) GetEntityData() *types.CommonEntityData {
configMode.EntityData.YFilter = configMode.YFilter
configMode.EntityData.YangName = "config-mode"
configMode.EntityData.BundleName = "cisco_ios_xr"
configMode.EntityData.ParentYangName = "hardware-module-port-mode"
configMode.EntityData.SegmentPath = "config-mode" + types.AddKeyToken(configMode.Id1, "id1")
configMode.EntityData.AbsolutePath = "Cisco-IOS-XR-asr9k-lc-pwrglide-cfg:hardware-module-port-mode/" + configMode.EntityData.SegmentPath
configMode.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
configMode.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
configMode.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
configMode.EntityData.Children = types.NewOrderedMap()
configMode.EntityData.Children.Append("node", types.YChild{"Node", nil})
for i := range configMode.Node {
configMode.EntityData.Children.Append(types.GetSegmentPath(configMode.Node[i]), types.YChild{"Node", configMode.Node[i]})
}
configMode.EntityData.Leafs = types.NewOrderedMap()
configMode.EntityData.Leafs.Append("id1", types.YLeaf{"Id1", configMode.Id1})
configMode.EntityData.YListKeys = []string {"Id1"}
return &(configMode.EntityData)
}
// HardwareModulePortMode_ConfigMode_Node
// A node
type HardwareModulePortMode_ConfigMode_Node struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
YListKey string
// This attribute is a key. Fully qualified line card specification. The type
// is string with pattern: [\w\-\.:,_@#%$\+=\|;]+.
Id2 interface{}
// Linecard port-mode.
PortMode HardwareModulePortMode_ConfigMode_Node_PortMode
}
func (node *HardwareModulePortMode_ConfigMode_Node) GetEntityData() *types.CommonEntityData {
node.EntityData.YFilter = node.YFilter
node.EntityData.YangName = "node"
node.EntityData.BundleName = "cisco_ios_xr"
node.EntityData.ParentYangName = "config-mode"
node.EntityData.SegmentPath = "node" + types.AddKeyToken(node.Id2, "id2")
node.EntityData.AbsolutePath = "Cisco-IOS-XR-asr9k-lc-pwrglide-cfg:hardware-module-port-mode/config-mode/" + node.EntityData.SegmentPath
node.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
node.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
node.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
node.EntityData.Children = types.NewOrderedMap()
node.EntityData.Children.Append("port-mode", types.YChild{"PortMode", &node.PortMode})
node.EntityData.Leafs = types.NewOrderedMap()
node.EntityData.Leafs.Append("id2", types.YLeaf{"Id2", node.Id2})
node.EntityData.YListKeys = []string {"Id2"}
return &(node.EntityData)
}
// HardwareModulePortMode_ConfigMode_Node_PortMode
// Linecard port-mode
type HardwareModulePortMode_ConfigMode_Node_PortMode struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Linecard interface port-mode. The type is string.
IfPortMode interface{}
}
func (portMode *HardwareModulePortMode_ConfigMode_Node_PortMode) GetEntityData() *types.CommonEntityData {
portMode.EntityData.YFilter = portMode.YFilter
portMode.EntityData.YangName = "port-mode"
portMode.EntityData.BundleName = "cisco_ios_xr"
portMode.EntityData.ParentYangName = "node"
portMode.EntityData.SegmentPath = "port-mode"
portMode.EntityData.AbsolutePath = "Cisco-IOS-XR-asr9k-lc-pwrglide-cfg:hardware-module-port-mode/config-mode/node/" + portMode.EntityData.SegmentPath
portMode.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
portMode.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
portMode.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
portMode.EntityData.Children = types.NewOrderedMap()
portMode.EntityData.Leafs = types.NewOrderedMap()
portMode.EntityData.Leafs.Append("if-port-mode", types.YLeaf{"IfPortMode", portMode.IfPortMode})
portMode.EntityData.YListKeys = []string {}
return &(portMode.EntityData)
}