Skip to content

Commit 981210e

Browse files
authored
Merge pull request #285 from Venkat-Kunaparaju/fix-auto-2nd
Skip unnecessary secondary NAD creation
2 parents 9b9509e + 595ca2d commit 981210e

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

trafficFlowTests.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def _setup_udn(self, cfg_descr: ConfigDescriptor) -> None:
139139
def _setup_secondary_nad(self, cfg_descr: ConfigDescriptor) -> None:
140140
tft = cfg_descr.get_tft()
141141
if not any(
142-
tc.info.connection_mode
142+
not tc.is_udn
143+
and tc.info.connection_mode
143144
in (
144145
tftbase.ConnectionMode.MULTI_HOME,
145146
tftbase.ConnectionMode.MNP_2ND_ALLOW,
@@ -152,7 +153,13 @@ def _setup_secondary_nad(self, cfg_descr: ConfigDescriptor) -> None:
152153

153154
namespace = tft.namespace
154155
client = cfg_descr.tc.client_tenant
155-
nad = cfg_descr.get_tft().connections[0].effective_secondary_network_nad
156+
conn = cfg_descr.get_tft().connections[0]
157+
server_nad = conn.server[0].effective_secondary_network_nad
158+
client_nad = conn.client[0].effective_secondary_network_nad
159+
if server_nad is not None or client_nad is not None:
160+
return
161+
162+
nad = conn.effective_secondary_network_nad
156163
nad_name = nad.split("/")[-1]
157164

158165
existing = client.oc_get(

0 commit comments

Comments
 (0)