Skip to content

Commit

Permalink
Update Aruba templates too
Browse files Browse the repository at this point in the history
Update test results
  • Loading branch information
jbemmel committed Jan 1, 2025
1 parent 33475f0 commit c8e6fd8
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 153 deletions.
4 changes: 2 additions & 2 deletions netsim/ansible/templates/lag/arubacx.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface lag {{ intf.lag.mlag.ifindex }}
description VSX ISL

!
{% for ch in ([intf]+interfaces) if ch==intf or ch.lag._parentindex|default(False) == intf.linkindex %}
{% for ch in ([intf]+interfaces) if ch==intf or ch.lag._peerlink|default(0) == intf.linkindex %}
interface {{ ch.ifname }}
no shutdown
description {{ ch.name }} (ISL in lag {{intf.lag.mlag.ifindex }})
Expand Down Expand Up @@ -54,7 +54,7 @@ interface {{ intf.ifname }}{{ mclag_intf }}{{ mclag_intf_static }}
no shutdown

!
{% for ch in interfaces if ch.lag._parentindex|default(False) == intf.linkindex %}
{% for ch in interfaces if ch.lag._parentindex|default(False) == intf.lag.ifindex %}
!
interface {{ ch.ifname }}
description {{ ch.name }} in lag {{ intf.lag.ifindex }}
Expand Down
4 changes: 2 additions & 2 deletions netsim/modules/lag.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def analyze_lag(members: list, node_count: typing.Dict[str,int]) -> typing.Tuple
return (False,False,"")
elif len(node_count)==3: # 1:2 MLAG or weird MLAG triangle
for node_name,count in node_count.items():
if count==len(l.lag.members):
if count==len(members):
return (True,False,node_name) # Found the 1-side node
elif len(node_count)==4: # 2:2 dual MLAG
return (True,True,"")
Expand Down Expand Up @@ -458,4 +458,4 @@ def node_post_transform(self, node: Box, topology: Box) -> None:
category=log.IncorrectAttr,
module='lag')

node.pop('_lag_ifindex',None) # Cleanup
node.pop('_lag_ifindex',None) # Cleanup
48 changes: 24 additions & 24 deletions tests/topology/expected/bgp-vrf-local-as.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ nodes:
- bridge_group: 1
ifindex: 2
ifname: Ethernet1.1
ipv4: 172.16.3.1/24
ipv4: 10.1.0.5/30
name: r1 -> r2
neighbors:
- ifname: Ethernet1.1
ipv4: 172.16.3.2/24
ipv4: 10.1.0.6/30
node: r2
vrf: blue
parent_ifindex: 1
Expand All @@ -174,11 +174,11 @@ nodes:
- bridge_group: 2
ifindex: 3
ifname: Ethernet1.2
ipv4: 172.16.4.1/24
ipv4: 10.1.0.9/30
name: r1 -> r2
neighbors:
- ifname: Ethernet1.2
ipv4: 172.16.4.2/24
ipv4: 10.1.0.10/30
node: r2
vrf: red
parent_ifindex: 1
Expand Down Expand Up @@ -240,7 +240,7 @@ nodes:
neighbors:
- as: 65000
ifindex: 2
ipv4: 172.16.3.2
ipv4: 10.1.0.6
name: r2
type: ebgp
export:
Expand All @@ -260,7 +260,7 @@ nodes:
neighbors:
- as: 65000
ifindex: 3
ipv4: 172.16.4.2
ipv4: 10.1.0.10
name: r2
type: ebgp
export:
Expand Down Expand Up @@ -363,11 +363,11 @@ nodes:
- bridge_group: 2
ifindex: 5
ifname: Ethernet1.1
ipv4: 172.16.3.2/24
ipv4: 10.1.0.6/30
name: r2 -> r1
neighbors:
- ifname: Ethernet1.1
ipv4: 172.16.3.1/24
ipv4: 10.1.0.5/30
node: r1
vrf: blue
parent_ifindex: 1
Expand All @@ -384,11 +384,11 @@ nodes:
- bridge_group: 3
ifindex: 6
ifname: Ethernet1.2
ipv4: 172.16.4.2/24
ipv4: 10.1.0.10/30
name: r2 -> r1
neighbors:
- ifname: Ethernet1.2
ipv4: 172.16.4.1/24
ipv4: 10.1.0.9/30
node: r1
vrf: red
parent_ifindex: 1
Expand All @@ -405,11 +405,11 @@ nodes:
- bridge_group: 2
ifindex: 7
ifname: Ethernet2.1
ipv4: 172.16.5.2/24
ipv4: 10.1.0.13/30
name: r2 -> r3
neighbors:
- ifname: Ethernet1.1
ipv4: 172.16.5.3/24
ipv4: 10.1.0.14/30
node: r3
vrf: blue
parent_ifindex: 2
Expand All @@ -426,11 +426,11 @@ nodes:
- bridge_group: 3
ifindex: 8
ifname: Ethernet2.2
ipv4: 172.16.6.2/24
ipv4: 10.1.0.17/30
name: r2 -> r3
neighbors:
- ifname: Ethernet1.2
ipv4: 172.16.6.3/24
ipv4: 10.1.0.18/30
node: r3
vrf: red
parent_ifindex: 2
Expand Down Expand Up @@ -505,12 +505,12 @@ nodes:
type: ebgp
- as: 65100
ifindex: 5
ipv4: 172.16.3.1
ipv4: 10.1.0.5
name: r1
type: ebgp
- as: 65101
ifindex: 7
ipv4: 172.16.5.3
ipv4: 10.1.0.14
name: r3
type: ebgp
router_id: 172.32.0.2
Expand All @@ -537,12 +537,12 @@ nodes:
type: ebgp
- as: 65100
ifindex: 6
ipv4: 172.16.4.1
ipv4: 10.1.0.9
name: r1
type: ebgp
- as: 65101
ifindex: 8
ipv4: 172.16.6.3
ipv4: 10.1.0.18
name: r3
type: ebgp
router_id: 172.31.0.1
Expand Down Expand Up @@ -598,11 +598,11 @@ nodes:
- bridge_group: 1
ifindex: 2
ifname: Ethernet1.1
ipv4: 172.16.5.3/24
ipv4: 10.1.0.14/30
name: r3 -> r2
neighbors:
- ifname: Ethernet2.1
ipv4: 172.16.5.2/24
ipv4: 10.1.0.13/30
node: r2
vrf: blue
parent_ifindex: 1
Expand All @@ -619,11 +619,11 @@ nodes:
- bridge_group: 2
ifindex: 3
ifname: Ethernet1.2
ipv4: 172.16.6.3/24
ipv4: 10.1.0.18/30
name: r3 -> r2
neighbors:
- ifname: Ethernet2.2
ipv4: 172.16.6.2/24
ipv4: 10.1.0.17/30
node: r2
vrf: red
parent_ifindex: 1
Expand Down Expand Up @@ -685,7 +685,7 @@ nodes:
neighbors:
- as: 65000
ifindex: 2
ipv4: 172.16.5.2
ipv4: 10.1.0.13
name: r2
type: ebgp
export:
Expand All @@ -705,7 +705,7 @@ nodes:
neighbors:
- as: 65000
ifindex: 3
ipv4: 172.16.6.2
ipv4: 10.1.0.17
name: r2
type: ebgp
export:
Expand Down
16 changes: 8 additions & 8 deletions tests/topology/expected/groups-vlan-vrf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ nodes:
- bridge_group: 2
ifindex: 3
ifname: eth1.1001
ipv4: 172.16.4.3/24
ipv4: 10.1.0.1/30
name: s1 -> s2
neighbors:
- ifname: eth3.1001
ipv4: 172.16.4.4/24
ipv4: 10.1.0.2/30
node: s2
vrf: red_vrf
parent_ifindex: 1
Expand Down Expand Up @@ -402,11 +402,11 @@ nodes:
- bridge_group: 2
ifindex: 3
ifname: eth1.1001
ipv4: 172.16.4.3/24
ipv4: 10.1.0.1/30
name: s1 -> s2
neighbors:
- ifname: eth3.1001
ipv4: 172.16.4.4/24
ipv4: 10.1.0.2/30
node: s2
vrf: red_vrf
ospf:
Expand Down Expand Up @@ -527,11 +527,11 @@ nodes:
- bridge_group: 1
ifindex: 5
ifname: eth3.1001
ipv4: 172.16.4.4/24
ipv4: 10.1.0.2/30
name: s2 -> s1
neighbors:
- ifname: eth1.1001
ipv4: 172.16.4.3/24
ipv4: 10.1.0.1/30
node: s1
vrf: red_vrf
parent_ifindex: 3
Expand Down Expand Up @@ -675,11 +675,11 @@ nodes:
- bridge_group: 1
ifindex: 5
ifname: eth3.1001
ipv4: 172.16.4.4/24
ipv4: 10.1.0.2/30
name: s2 -> s1
neighbors:
- ifname: eth1.1001
ipv4: 172.16.4.3/24
ipv4: 10.1.0.1/30
node: s1
vrf: red_vrf
ospf:
Expand Down
12 changes: 0 additions & 12 deletions tests/topology/expected/lag-l2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ nodes:
neighbors:
- ifname: port-channel1
node: r2
<<<<<<< HEAD
prefix: false
=======
stp:
enable: false
>>>>>>> f2eb98413 (Refactored to temporarily rename interface.type to '_type' to bypass validation)
stp:
enable: false
type: lag
Expand Down Expand Up @@ -278,12 +272,6 @@ nodes:
neighbors:
- ifname: port-channel1
node: r1
<<<<<<< HEAD
prefix: false
=======
stp:
enable: false
>>>>>>> f2eb98413 (Refactored to temporarily rename interface.type to '_type' to bypass validation)
stp:
enable: false
type: lag
Expand Down
Loading

0 comments on commit c8e6fd8

Please sign in to comment.