Skip to content

Commit c8e6fd8

Browse files
committed
Update Aruba templates too
Update test results
1 parent 33475f0 commit c8e6fd8

File tree

10 files changed

+141
-153
lines changed

10 files changed

+141
-153
lines changed

netsim/ansible/templates/lag/arubacx.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface lag {{ intf.lag.mlag.ifindex }}
1010
description VSX ISL
1111

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

5656
!
57-
{% for ch in interfaces if ch.lag._parentindex|default(False) == intf.linkindex %}
57+
{% for ch in interfaces if ch.lag._parentindex|default(False) == intf.lag.ifindex %}
5858
!
5959
interface {{ ch.ifname }}
6060
description {{ ch.name }} in lag {{ intf.lag.ifindex }}

netsim/modules/lag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def analyze_lag(members: list, node_count: typing.Dict[str,int]) -> typing.Tuple
214214
return (False,False,"")
215215
elif len(node_count)==3: # 1:2 MLAG or weird MLAG triangle
216216
for node_name,count in node_count.items():
217-
if count==len(l.lag.members):
217+
if count==len(members):
218218
return (True,False,node_name) # Found the 1-side node
219219
elif len(node_count)==4: # 2:2 dual MLAG
220220
return (True,True,"")
@@ -458,4 +458,4 @@ def node_post_transform(self, node: Box, topology: Box) -> None:
458458
category=log.IncorrectAttr,
459459
module='lag')
460460

461-
node.pop('_lag_ifindex',None) # Cleanup
461+
node.pop('_lag_ifindex',None) # Cleanup

tests/topology/expected/bgp-vrf-local-as.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ nodes:
153153
- bridge_group: 1
154154
ifindex: 2
155155
ifname: Ethernet1.1
156-
ipv4: 172.16.3.1/24
156+
ipv4: 10.1.0.5/30
157157
name: r1 -> r2
158158
neighbors:
159159
- ifname: Ethernet1.1
160-
ipv4: 172.16.3.2/24
160+
ipv4: 10.1.0.6/30
161161
node: r2
162162
vrf: blue
163163
parent_ifindex: 1
@@ -174,11 +174,11 @@ nodes:
174174
- bridge_group: 2
175175
ifindex: 3
176176
ifname: Ethernet1.2
177-
ipv4: 172.16.4.1/24
177+
ipv4: 10.1.0.9/30
178178
name: r1 -> r2
179179
neighbors:
180180
- ifname: Ethernet1.2
181-
ipv4: 172.16.4.2/24
181+
ipv4: 10.1.0.10/30
182182
node: r2
183183
vrf: red
184184
parent_ifindex: 1
@@ -240,7 +240,7 @@ nodes:
240240
neighbors:
241241
- as: 65000
242242
ifindex: 2
243-
ipv4: 172.16.3.2
243+
ipv4: 10.1.0.6
244244
name: r2
245245
type: ebgp
246246
export:
@@ -260,7 +260,7 @@ nodes:
260260
neighbors:
261261
- as: 65000
262262
ifindex: 3
263-
ipv4: 172.16.4.2
263+
ipv4: 10.1.0.10
264264
name: r2
265265
type: ebgp
266266
export:
@@ -363,11 +363,11 @@ nodes:
363363
- bridge_group: 2
364364
ifindex: 5
365365
ifname: Ethernet1.1
366-
ipv4: 172.16.3.2/24
366+
ipv4: 10.1.0.6/30
367367
name: r2 -> r1
368368
neighbors:
369369
- ifname: Ethernet1.1
370-
ipv4: 172.16.3.1/24
370+
ipv4: 10.1.0.5/30
371371
node: r1
372372
vrf: blue
373373
parent_ifindex: 1
@@ -384,11 +384,11 @@ nodes:
384384
- bridge_group: 3
385385
ifindex: 6
386386
ifname: Ethernet1.2
387-
ipv4: 172.16.4.2/24
387+
ipv4: 10.1.0.10/30
388388
name: r2 -> r1
389389
neighbors:
390390
- ifname: Ethernet1.2
391-
ipv4: 172.16.4.1/24
391+
ipv4: 10.1.0.9/30
392392
node: r1
393393
vrf: red
394394
parent_ifindex: 1
@@ -405,11 +405,11 @@ nodes:
405405
- bridge_group: 2
406406
ifindex: 7
407407
ifname: Ethernet2.1
408-
ipv4: 172.16.5.2/24
408+
ipv4: 10.1.0.13/30
409409
name: r2 -> r3
410410
neighbors:
411411
- ifname: Ethernet1.1
412-
ipv4: 172.16.5.3/24
412+
ipv4: 10.1.0.14/30
413413
node: r3
414414
vrf: blue
415415
parent_ifindex: 2
@@ -426,11 +426,11 @@ nodes:
426426
- bridge_group: 3
427427
ifindex: 8
428428
ifname: Ethernet2.2
429-
ipv4: 172.16.6.2/24
429+
ipv4: 10.1.0.17/30
430430
name: r2 -> r3
431431
neighbors:
432432
- ifname: Ethernet1.2
433-
ipv4: 172.16.6.3/24
433+
ipv4: 10.1.0.18/30
434434
node: r3
435435
vrf: red
436436
parent_ifindex: 2
@@ -505,12 +505,12 @@ nodes:
505505
type: ebgp
506506
- as: 65100
507507
ifindex: 5
508-
ipv4: 172.16.3.1
508+
ipv4: 10.1.0.5
509509
name: r1
510510
type: ebgp
511511
- as: 65101
512512
ifindex: 7
513-
ipv4: 172.16.5.3
513+
ipv4: 10.1.0.14
514514
name: r3
515515
type: ebgp
516516
router_id: 172.32.0.2
@@ -537,12 +537,12 @@ nodes:
537537
type: ebgp
538538
- as: 65100
539539
ifindex: 6
540-
ipv4: 172.16.4.1
540+
ipv4: 10.1.0.9
541541
name: r1
542542
type: ebgp
543543
- as: 65101
544544
ifindex: 8
545-
ipv4: 172.16.6.3
545+
ipv4: 10.1.0.18
546546
name: r3
547547
type: ebgp
548548
router_id: 172.31.0.1
@@ -598,11 +598,11 @@ nodes:
598598
- bridge_group: 1
599599
ifindex: 2
600600
ifname: Ethernet1.1
601-
ipv4: 172.16.5.3/24
601+
ipv4: 10.1.0.14/30
602602
name: r3 -> r2
603603
neighbors:
604604
- ifname: Ethernet2.1
605-
ipv4: 172.16.5.2/24
605+
ipv4: 10.1.0.13/30
606606
node: r2
607607
vrf: blue
608608
parent_ifindex: 1
@@ -619,11 +619,11 @@ nodes:
619619
- bridge_group: 2
620620
ifindex: 3
621621
ifname: Ethernet1.2
622-
ipv4: 172.16.6.3/24
622+
ipv4: 10.1.0.18/30
623623
name: r3 -> r2
624624
neighbors:
625625
- ifname: Ethernet2.2
626-
ipv4: 172.16.6.2/24
626+
ipv4: 10.1.0.17/30
627627
node: r2
628628
vrf: red
629629
parent_ifindex: 1
@@ -685,7 +685,7 @@ nodes:
685685
neighbors:
686686
- as: 65000
687687
ifindex: 2
688-
ipv4: 172.16.5.2
688+
ipv4: 10.1.0.13
689689
name: r2
690690
type: ebgp
691691
export:
@@ -705,7 +705,7 @@ nodes:
705705
neighbors:
706706
- as: 65000
707707
ifindex: 3
708-
ipv4: 172.16.6.2
708+
ipv4: 10.1.0.17
709709
name: r2
710710
type: ebgp
711711
export:

tests/topology/expected/groups-vlan-vrf.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ nodes:
295295
- bridge_group: 2
296296
ifindex: 3
297297
ifname: eth1.1001
298-
ipv4: 172.16.4.3/24
298+
ipv4: 10.1.0.1/30
299299
name: s1 -> s2
300300
neighbors:
301301
- ifname: eth3.1001
302-
ipv4: 172.16.4.4/24
302+
ipv4: 10.1.0.2/30
303303
node: s2
304304
vrf: red_vrf
305305
parent_ifindex: 1
@@ -402,11 +402,11 @@ nodes:
402402
- bridge_group: 2
403403
ifindex: 3
404404
ifname: eth1.1001
405-
ipv4: 172.16.4.3/24
405+
ipv4: 10.1.0.1/30
406406
name: s1 -> s2
407407
neighbors:
408408
- ifname: eth3.1001
409-
ipv4: 172.16.4.4/24
409+
ipv4: 10.1.0.2/30
410410
node: s2
411411
vrf: red_vrf
412412
ospf:
@@ -527,11 +527,11 @@ nodes:
527527
- bridge_group: 1
528528
ifindex: 5
529529
ifname: eth3.1001
530-
ipv4: 172.16.4.4/24
530+
ipv4: 10.1.0.2/30
531531
name: s2 -> s1
532532
neighbors:
533533
- ifname: eth1.1001
534-
ipv4: 172.16.4.3/24
534+
ipv4: 10.1.0.1/30
535535
node: s1
536536
vrf: red_vrf
537537
parent_ifindex: 3
@@ -675,11 +675,11 @@ nodes:
675675
- bridge_group: 1
676676
ifindex: 5
677677
ifname: eth3.1001
678-
ipv4: 172.16.4.4/24
678+
ipv4: 10.1.0.2/30
679679
name: s2 -> s1
680680
neighbors:
681681
- ifname: eth1.1001
682-
ipv4: 172.16.4.3/24
682+
ipv4: 10.1.0.1/30
683683
node: s1
684684
vrf: red_vrf
685685
ospf:

tests/topology/expected/lag-l2.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ nodes:
119119
neighbors:
120120
- ifname: port-channel1
121121
node: r2
122-
<<<<<<< HEAD
123-
prefix: false
124-
=======
125-
stp:
126-
enable: false
127-
>>>>>>> f2eb98413 (Refactored to temporarily rename interface.type to '_type' to bypass validation)
128122
stp:
129123
enable: false
130124
type: lag
@@ -278,12 +272,6 @@ nodes:
278272
neighbors:
279273
- ifname: port-channel1
280274
node: r1
281-
<<<<<<< HEAD
282-
prefix: false
283-
=======
284-
stp:
285-
enable: false
286-
>>>>>>> f2eb98413 (Refactored to temporarily rename interface.type to '_type' to bypass validation)
287275
stp:
288276
enable: false
289277
type: lag

0 commit comments

Comments
 (0)