Skip to content

Commit 0ebd67e

Browse files
laxmikantchintakindipre-commit-ci[bot]Vibhu-gslabClausHolbechAristagmuloc
authored
Fix(eos_designs): Refactor structured_config/inband_management/__init__.py (#6811)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Vibhu-gslab <[email protected]> Co-authored-by: Claus Holbech <[email protected]> Co-authored-by: Guillaume Mulocher <[email protected]>
1 parent e685e90 commit 0ebd67e

19 files changed

Lines changed: 611 additions & 157 deletions

File tree

ansible_collections/arista/avd/extensions/molecule/eos_designs_unit_tests/intended/configs/inband-mgmt-ipv6-only-vrf.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ interface Ethernet2
3838
no shutdown
3939
channel-group 1 mode active
4040
!
41+
interface Ethernet3
42+
description INBAND-MGMT-PARENT-IPV6-3_Ethernet27
43+
no shutdown
44+
channel-group 1 mode active
45+
!
4146
interface Vlan107
4247
description Inband Management
4348
no shutdown
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
!
2+
no enable password
3+
no aaa root
4+
!
5+
daemon TerminAttr
6+
exec /usr/bin/TerminAttr -cvaddr=apiserver.arista.io:443 -cvauth=token-secure,/tmp/cv-onboarding-token -cvvrf=VRF6 -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -taillogs
7+
no shutdown
8+
!
9+
vlan internal order ascending range 1006 1199
10+
!
11+
transceiver qsfp default-mode 4x10G
12+
!
13+
service routing protocols model multi-agent
14+
!
15+
hostname inband-mgmt-ipv6-with-address
16+
ip name-server vrf VRF6 1.1.1.1
17+
ip name-server vrf VRF6 8.8.8.8
18+
!
19+
vlan 4092
20+
name INBAND_MGMT
21+
!
22+
vrf instance MGMT
23+
!
24+
vrf instance VRF6
25+
!
26+
interface Port-Channel1
27+
description inband-mgmt-parents-ipv6_Po28
28+
no shutdown
29+
switchport trunk allowed vlan 4092
30+
switchport mode trunk
31+
switchport
32+
!
33+
interface Ethernet1
34+
description INBAND-MGMT-PARENT-IPV6-1_Ethernet28
35+
no shutdown
36+
channel-group 1 mode active
37+
!
38+
interface Ethernet2
39+
description INBAND-MGMT-PARENT-IPV6-2_Ethernet28
40+
no shutdown
41+
channel-group 1 mode active
42+
!
43+
interface Vlan4092
44+
description Inband Management
45+
no shutdown
46+
mtu 1500
47+
vrf VRF6
48+
ipv6 enable
49+
ipv6 address 2a00:105::124/64
50+
no ip routing vrf MGMT
51+
!
52+
ntp local-interface vrf VRF6 Vlan4092
53+
ntp server vrf VRF6 2.2.2.55 prefer
54+
ntp server vrf VRF6 pool.ntp.org
55+
!
56+
end

ansible_collections/arista/avd/extensions/molecule/eos_designs_unit_tests/intended/configs/inband-mgmt-parent-ipv6-1.cfg

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ interface Port-Channel27
6161
port-channel lacp fallback timeout 30
6262
mlag 27
6363
!
64+
interface Port-Channel28
65+
description INBAND-MGMT-IPV6-WITH-ADDRESS_Po1
66+
no shutdown
67+
switchport trunk allowed vlan 4092
68+
switchport mode trunk
69+
switchport
70+
port-channel lacp fallback individual
71+
port-channel lacp fallback timeout 30
72+
mlag 28
73+
!
6474
interface Ethernet11
6575
description MLAG_inband-mgmt-parent-ipv6-2_Ethernet11
6676
no shutdown
@@ -137,6 +147,14 @@ interface Ethernet27
137147
switchport
138148
channel-group 27 mode active
139149
!
150+
interface Ethernet28
151+
description INBAND-MGMT-IPV6-WITH-ADDRESS_Ethernet1
152+
no shutdown
153+
switchport access vlan 4092
154+
switchport mode access
155+
switchport
156+
channel-group 28 mode active
157+
!
140158
interface Loopback0
141159
description ROUTER_ID
142160
no shutdown

ansible_collections/arista/avd/extensions/molecule/eos_designs_unit_tests/intended/configs/inband-mgmt-parent-ipv6-2.cfg

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ interface Port-Channel27
6363
port-channel lacp fallback timeout 30
6464
mlag 27
6565
!
66+
interface Port-Channel28
67+
description INBAND-MGMT-IPV6-WITH-ADDRESS_Po1
68+
no shutdown
69+
switchport trunk allowed vlan 4092
70+
switchport mode trunk
71+
switchport
72+
port-channel lacp fallback individual
73+
port-channel lacp fallback timeout 30
74+
mlag 28
75+
!
6676
interface Ethernet11
6777
description MLAG_inband-mgmt-parent-ipv6-1_Ethernet11
6878
no shutdown
@@ -139,6 +149,14 @@ interface Ethernet27
139149
switchport
140150
channel-group 27 mode active
141151
!
152+
interface Ethernet28
153+
description INBAND-MGMT-IPV6-WITH-ADDRESS_Ethernet2
154+
no shutdown
155+
switchport access vlan 4092
156+
switchport mode access
157+
switchport
158+
channel-group 28 mode active
159+
!
142160
interface Loopback0
143161
description ROUTER_ID
144162
no shutdown
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
!
2+
no enable password
3+
no aaa root
4+
!
5+
daemon TerminAttr
6+
exec /usr/bin/TerminAttr -cvaddr=apiserver.arista.io:443 -cvauth=token-secure,/tmp/cv-onboarding-token -cvvrf=MGMT -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -taillogs
7+
no shutdown
8+
!
9+
vlan internal order ascending range 1006 1199
10+
!
11+
transceiver qsfp default-mode 4x10G
12+
!
13+
service routing protocols model multi-agent
14+
!
15+
hostname inband-mgmt-parent-ipv6-3
16+
ip name-server vrf MGMT 1.1.1.1
17+
ip name-server vrf MGMT 8.8.8.8
18+
!
19+
vlan 107
20+
name INBAND_MGMT
21+
!
22+
vrf instance MGMT
23+
!
24+
interface Port-Channel27
25+
description INBAND-MGMT-IPV6-ONLY-VRF_Po1
26+
no shutdown
27+
switchport trunk allowed vlan 107
28+
switchport mode trunk
29+
switchport
30+
port-channel lacp fallback individual
31+
port-channel lacp fallback timeout 30
32+
!
33+
interface Ethernet27
34+
description INBAND-MGMT-IPV6-ONLY-VRF_Ethernet3
35+
no shutdown
36+
switchport access vlan 107
37+
switchport mode access
38+
switchport
39+
channel-group 27 mode active
40+
!
41+
interface Loopback0
42+
description ROUTER_ID
43+
no shutdown
44+
ip address 10.0.255.7/32
45+
!
46+
interface Management1
47+
description OOB_MANAGEMENT
48+
no shutdown
49+
vrf MGMT
50+
ip address 192.168.100.17/24
51+
!
52+
interface Vlan107
53+
description Inband Management
54+
no shutdown
55+
mtu 1500
56+
ipv6 attached-host route export 19
57+
ipv6 enable
58+
ipv6 address 2a00:107::2/64
59+
ipv6 virtual-router address 2a00:107::1
60+
!
61+
ip virtual-router mac-address 00:1c:73:00:dc:01
62+
!
63+
ip routing
64+
no ip routing vrf MGMT
65+
!
66+
ntp local-interface vrf MGMT Management1
67+
ntp server vrf MGMT 2.2.2.55 prefer
68+
ntp server vrf MGMT pool.ntp.org
69+
!
70+
router bgp 65006
71+
router-id 10.0.255.7
72+
update wait-install
73+
no bgp default ipv4-unicast
74+
maximum-paths 4
75+
redistribute connected
76+
redistribute attached-host
77+
!
78+
end

ansible_collections/arista/avd/extensions/molecule/eos_designs_unit_tests/intended/structured_configs/inband-mgmt-ipv6-only-vrf.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ ethernet_interfaces:
3333
peer: inband-mgmt-parent-ipv6-2
3434
peer_interface: Ethernet27
3535
peer_type: l3leaf
36+
- name: Ethernet3
37+
description: INBAND-MGMT-PARENT-IPV6-3_Ethernet27
38+
shutdown: false
39+
channel_group:
40+
id: 1
41+
mode: active
42+
metadata:
43+
peer: inband-mgmt-parent-ipv6-3
44+
peer_interface: Ethernet27
45+
peer_type: l3leaf
3646
hostname: inband-mgmt-ipv6-only-vrf
3747
ip_igmp_snooping:
3848
globally_enabled: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
aaa_root:
2+
disabled: true
3+
config_end: true
4+
daemon_terminattr:
5+
cvaddrs:
6+
- apiserver.arista.io:443
7+
cvauth:
8+
method: token-secure
9+
token_file: /tmp/cv-onboarding-token
10+
cvvrf: VRF6
11+
disable_aaa: false
12+
smashexcludes: ale,flexCounter,hardware,kni,pulse,strata
13+
enable_password:
14+
disabled: true
15+
ethernet_interfaces:
16+
- name: Ethernet1
17+
description: INBAND-MGMT-PARENT-IPV6-1_Ethernet28
18+
shutdown: false
19+
channel_group:
20+
id: 1
21+
mode: active
22+
metadata:
23+
peer: inband-mgmt-parent-ipv6-1
24+
peer_interface: Ethernet28
25+
peer_type: l3leaf
26+
- name: Ethernet2
27+
description: INBAND-MGMT-PARENT-IPV6-2_Ethernet28
28+
shutdown: false
29+
channel_group:
30+
id: 1
31+
mode: active
32+
metadata:
33+
peer: inband-mgmt-parent-ipv6-2
34+
peer_interface: Ethernet28
35+
peer_type: l3leaf
36+
hostname: inband-mgmt-ipv6-with-address
37+
ip_igmp_snooping:
38+
globally_enabled: true
39+
ip_name_server:
40+
vrfs:
41+
- name: VRF6
42+
servers:
43+
- ip_address: 1.1.1.1
44+
- ip_address: 8.8.8.8
45+
metadata:
46+
is_deployed: true
47+
fabric_name: EOS_DESIGNS_UNIT_TESTS
48+
ntp:
49+
local_interface:
50+
name: Vlan4092
51+
vrf: VRF6
52+
servers:
53+
- name: 2.2.2.55
54+
preferred: true
55+
- name: pool.ntp.org
56+
vrf: VRF6
57+
port_channel_interfaces:
58+
- name: Port-Channel1
59+
description: inband-mgmt-parents-ipv6_Po28
60+
shutdown: false
61+
switchport:
62+
enabled: true
63+
mode: trunk
64+
trunk:
65+
allowed_vlan: '4092'
66+
service_routing_protocols_model: multi-agent
67+
transceiver_qsfp_default_mode_4x10: true
68+
vlan_interfaces:
69+
- name: Vlan4092
70+
description: Inband Management
71+
shutdown: false
72+
vrf: VRF6
73+
ipv6_enable: true
74+
ipv6_addresses:
75+
- 2a00:105::124/64
76+
mtu: 1500
77+
metadata:
78+
type: inband_mgmt
79+
vlan_internal_order:
80+
allocation: ascending
81+
range:
82+
beginning: 1006
83+
ending: 1199
84+
vlans:
85+
- id: 4092
86+
name: INBAND_MGMT
87+
metadata:
88+
tenants:
89+
- system
90+
vrfs:
91+
- name: MGMT
92+
ip_routing: false
93+
- name: VRF6

ansible_collections/arista/avd/extensions/molecule/eos_designs_unit_tests/intended/structured_configs/inband-mgmt-parent-ipv6-1.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,20 @@ ethernet_interfaces:
151151
enabled: true
152152
mode: access
153153
access_vlan: 107
154+
- name: Ethernet28
155+
description: INBAND-MGMT-IPV6-WITH-ADDRESS_Ethernet1
156+
shutdown: false
157+
channel_group:
158+
id: 28
159+
mode: active
160+
metadata:
161+
peer: inband-mgmt-ipv6-with-address
162+
peer_interface: Ethernet1
163+
peer_type: l2leaf
164+
switchport:
165+
enabled: true
166+
mode: access
167+
access_vlan: 4092
154168
hostname: inband-mgmt-parent-ipv6-1
155169
ip_igmp_snooping:
156170
globally_enabled: true
@@ -236,6 +250,17 @@ port_channel_interfaces:
236250
mode: trunk
237251
trunk:
238252
allowed_vlan: '107'
253+
- name: Port-Channel28
254+
description: INBAND-MGMT-IPV6-WITH-ADDRESS_Po1
255+
shutdown: false
256+
mlag: 28
257+
lacp_fallback_timeout: 30
258+
lacp_fallback_mode: individual
259+
switchport:
260+
enabled: true
261+
mode: trunk
262+
trunk:
263+
allowed_vlan: '4092'
239264
prefix_lists:
240265
- name: PL-LOOPBACKS-EVPN-OVERLAY
241266
sequence_numbers:

0 commit comments

Comments
 (0)