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
/
bundlemgr_cfg.go
225 lines (171 loc) · 6.38 KB
/
bundlemgr_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
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
// This module contains a collection of YANG definitions
// for Cisco IOS-XR bundlemgr package configuration.
//
// This module contains definitions
// for the following management objects:
// lacp: Link Aggregation Control Protocol commands
//
// This YANG module augments the
// Cisco-IOS-XR-ifmgr-cfg,
// Cisco-IOS-XR-rgmgr-cfg,
// modules with configuration data.
//
// Copyright (c) 2013-2018 by Cisco Systems, Inc.
// All rights reserved.
package bundlemgr_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 bundlemgr_cfg"))
ydk.RegisterEntity("{http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-cfg lacp}", reflect.TypeOf(Lacp{}))
ydk.RegisterEntity("Cisco-IOS-XR-bundlemgr-cfg:lacp", reflect.TypeOf(Lacp{}))
}
// BundleMaximumActiveLinksMode represents Bundle maximum active links mode
type BundleMaximumActiveLinksMode string
const (
// Default
BundleMaximumActiveLinksMode_default_ BundleMaximumActiveLinksMode = "default"
// Hot standby
BundleMaximumActiveLinksMode_hot_standby BundleMaximumActiveLinksMode = "hot-standby"
)
// BundleCiscoExtTypes represents Bundle cisco ext types
type BundleCiscoExtTypes string
const (
// LON signaling disabled
BundleCiscoExtTypes_lon_signaling_off BundleCiscoExtTypes = "lon-signaling-off"
// LON signaling enabled
BundleCiscoExtTypes_lon_signaling_on BundleCiscoExtTypes = "lon-signaling-on"
)
// BundleMode represents Bundle mode
type BundleMode string
const (
// On
BundleMode_on BundleMode = "on"
// Active
BundleMode_active BundleMode = "active"
// Passive
BundleMode_passive BundleMode = "passive"
)
// BundleLoadBalance represents Bundle load balance
type BundleLoadBalance string
const (
// Default hash function used
BundleLoadBalance_default_ BundleLoadBalance = "default"
// Send all traffic for this EFP over an
// automatically selected member
BundleLoadBalance_efp_auto BundleLoadBalance = "efp-auto"
// Send all traffic for this EFP over the member
// corresponding to the specified hash function
BundleLoadBalance_efp_value BundleLoadBalance = "efp-value"
// Load balance according to source IP address
BundleLoadBalance_source_ip BundleLoadBalance = "source-ip"
// Load balance according to detination IP address
BundleLoadBalance_destination_ip BundleLoadBalance = "destination-ip"
)
// ChurnLogging represents Churn logging
type ChurnLogging string
const (
// Logging for actor churn only
ChurnLogging_actor ChurnLogging = "actor"
// Logging for partner churn only
ChurnLogging_partner ChurnLogging = "partner"
// Logging for actor and partner churn
ChurnLogging_both ChurnLogging = "both"
)
// MlacpSwitchover represents Mlacp switchover
type MlacpSwitchover string
const (
// Brute force shutdown
MlacpSwitchover_brute_force MlacpSwitchover = "brute-force"
// Revertive behavior
MlacpSwitchover_revertive MlacpSwitchover = "revertive"
)
// MlacpMaximizeParameter represents Mlacp maximize parameter
type MlacpMaximizeParameter string
const (
// Maximize the number of operational links
MlacpMaximizeParameter_links MlacpMaximizeParameter = "links"
// Maximize the operational bandwidth
MlacpMaximizeParameter_bandwidth MlacpMaximizeParameter = "bandwidth"
)
// BfdMode represents Bfd mode
type BfdMode string
const (
// BFD mode not configured on per-bundle basis
BfdMode_no_cfg BfdMode = "no-cfg"
// BFD mode Cisco
BfdMode_cisco BfdMode = "cisco"
// BFD mode IETF
BfdMode_ietf BfdMode = "ietf"
)
// PeriodShortEnum represents Period short enum
type PeriodShortEnum string
const (
// Use the standard LACP short period (1s)
PeriodShortEnum_true_ PeriodShortEnum = "true"
)
// BundleMinimumBandwidthRange represents Bundle minimum bandwidth range
type BundleMinimumBandwidthRange string
const (
// None
BundleMinimumBandwidthRange_none BundleMinimumBandwidthRange = "none"
// kbps
BundleMinimumBandwidthRange_kbps BundleMinimumBandwidthRange = "kbps"
// mbps
BundleMinimumBandwidthRange_mbps BundleMinimumBandwidthRange = "mbps"
// gbps
BundleMinimumBandwidthRange_gbps BundleMinimumBandwidthRange = "gbps"
)
// BundlePeriod represents Bundle period
type BundlePeriod string
const (
// Use the standard LACP short period (1s)
BundlePeriod_true_ BundlePeriod = "true"
)
// BundlePortActivity represents Bundle port activity
type BundlePortActivity string
const (
// On
BundlePortActivity_on BundlePortActivity = "on"
// Active
BundlePortActivity_active BundlePortActivity = "active"
// Passive
BundlePortActivity_passive BundlePortActivity = "passive"
// Inherit
BundlePortActivity_inherit BundlePortActivity = "inherit"
)
// Lacp
// Link Aggregation Control Protocol commands
type Lacp struct {
EntityData types.CommonEntityData
YFilter yfilter.YFilter
// Unique identifier for this system. The type is string with pattern:
// [0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}.
SystemMac interface{}
// Priority for this system. Lower value is higher priority. The type is
// interface{} with range: 1..65535. The default value is 32768.
SystemPriority interface{}
}
func (lacp *Lacp) GetEntityData() *types.CommonEntityData {
lacp.EntityData.YFilter = lacp.YFilter
lacp.EntityData.YangName = "lacp"
lacp.EntityData.BundleName = "cisco_ios_xr"
lacp.EntityData.ParentYangName = "Cisco-IOS-XR-bundlemgr-cfg"
lacp.EntityData.SegmentPath = "Cisco-IOS-XR-bundlemgr-cfg:lacp"
lacp.EntityData.AbsolutePath = lacp.EntityData.SegmentPath
lacp.EntityData.CapabilitiesTable = cisco_ios_xr.GetCapabilities()
lacp.EntityData.NamespaceTable = cisco_ios_xr.GetNamespaces()
lacp.EntityData.BundleYangModelsLocation = cisco_ios_xr.GetModelsPath()
lacp.EntityData.Children = types.NewOrderedMap()
lacp.EntityData.Leafs = types.NewOrderedMap()
lacp.EntityData.Leafs.Append("system-mac", types.YLeaf{"SystemMac", lacp.SystemMac})
lacp.EntityData.Leafs.Append("system-priority", types.YLeaf{"SystemPriority", lacp.SystemPriority})
lacp.EntityData.YListKeys = []string {}
return &(lacp.EntityData)
}