Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Vibhu-gslab committed Jul 24, 2024
1 parent 81b0b48 commit a6689fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 4 additions & 0 deletions python-avd/pyavd/_eos_designs/eos_designs_facts/short_esi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def _short_esi(self: EosDesignsFacts) -> str:
"""
short_esi = get(self.shared_utils.switch_data_combined, "short_esi")
if short_esi == "auto":
if self.shared_utils.mlag_role == "secondary":
# On the MLAG Secondary use short-esi from MLAG primary
if (peer_short_esi := self.shared_utils.mlag_peer_facts._short_esi) is not None:
return peer_short_esi
esi_seed_1 = "".join(self.shared_utils.uplink_switches[:2])
esi_seed_2 = "".join(self.shared_utils.uplink_switch_interfaces[:2])
esi_seed_3 = "".join(default(self.shared_utils.uplink_interfaces, [])[:2])
Expand Down
6 changes: 1 addition & 5 deletions python-avd/pyavd/_eos_designs/eos_designs_facts/uplinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,7 @@ def _get_l2_uplink(
if uplink_native_vlan := get(self.shared_utils.switch_data_combined, "uplink_native_vlan"):
uplink["native_vlan"] = uplink_native_vlan

if self.shared_utils.mlag_role == "secondary":
# On the MLAG Secondary use short-esi from MLAG primary
if (peer_short_esi := self.shared_utils.mlag_peer_facts._short_esi) is not None:
uplink["peer_short_esi"] = peer_short_esi
elif self._short_esi is not None:
if self._short_esi is not None:
uplink["peer_short_esi"] = self._short_esi

if self.shared_utils.link_tracking_groups is not None:
Expand Down

0 comments on commit a6689fe

Please sign in to comment.