Skip to content

Commit

Permalink
Merge branch 'main' into CASMNET-2164
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebates123 authored Feb 16, 2024
2 parents a5b5f80 + 42e90d5 commit d8e8171
Show file tree
Hide file tree
Showing 2 changed files with 4 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 @@ -1519,9 +1519,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 @@ -1539,10 +1540,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

0 comments on commit d8e8171

Please sign in to comment.