Skip to content

Commit

Permalink
Merge branch 'main' into fix_gateway_nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebates123 authored Feb 22, 2024
2 parents 826cb93 + 42e90d5 commit 1717182
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [UNRELEASED]

- Ensure that the variable designating a switch as primary is always initialized.

## [1.8.0]

- Move NMN/HMN/MTL to new vrf, move CMN/CHN/CAN to default vrf.
Expand Down
5 changes: 2 additions & 3 deletions canu/generate/switch/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,9 +1466,10 @@ def get_switch_nodes(
}
nodes.append(new_node)
elif shasta_name == "sw-spine":
is_primary, primary, secondary = switch_is_primary(switch_name)

# sw-leaf ==> sw-spine
if switch_name.startswith("sw-leaf"):
is_primary, primary, secondary = switch_is_primary(switch_name)
digits = re.findall(r"(\d+)", primary)[0]
lag_number = 100 + int(digits)

Expand All @@ -1486,10 +1487,8 @@ def get_switch_nodes(

# sw-spine ==> sw-spine
elif switch_name.startswith("sw-spine"):
is_primary, primary, secondary = switch_is_primary(switch_name)
lag_number = 256
elif switch_name.startswith("sw-edge"):
is_primary, primary, secondary = switch_is_primary(switch_name)
lag_number = 250
new_node = {
"subtype": "spine",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ interface vlan {{ variables.CMN_VLAN }}
ip address {{ variables.CMN_IP }}/{{variables.CMN_PREFIX_LEN}}
ip ospf 1 area 0.0.0.0
snmp-server vrf default
snmp-server vrf {{ variables.VRF }}
ip dns server-address {{ variables.NMNLB_DNS }} vrf {{ variables.VRF }}
router ospf 2 vrf {{ variables.VRF }}
router-id {{ variables.LOOPBACK_IP }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ interface vlan {{ variables.CMN_VLAN }}
ip address {{ variables.CMN_IP }}/{{variables.CMN_PREFIX_LEN}}
ip ospf 1 area 0.0.0.0
snmp-server vrf default
snmp-server vrf {{ variables.VRF }}
ip dns server-address {{ variables.NMNLB_DNS }} vrf {{ variables.VRF }}
router ospf 2 vrf {{ variables.VRF }}
router-id {{ variables.LOOPBACK_IP }}
Expand Down

0 comments on commit 1717182

Please sign in to comment.