Skip to content

Commit

Permalink
moving logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Vibhu-gslab committed Jul 24, 2024
1 parent a6689fe commit 4ca6b0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python-avd/pyavd/_eos_designs/eos_designs_facts/short_esi.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def _short_esi(self: EosDesignsFacts) -> str:
If short_esi is set to "auto" we will use sha256 to create a
unique short_esi value based on various uplink information.
"""
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
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

0 comments on commit 4ca6b0e

Please sign in to comment.