Skip to content

Commit 595ca2d

Browse files
committed
Skip unnecessary secondary NAD creation
When server/client nodes already have NADs specified, skip creating the fallback tft-secondary NAD. Also exclude UDN test cases from triggering NAD creation in the ft namespace, since UDN tests run in ft-udn with their own NAD setup. Signed-off-by: Venkat Kunaparaju <vkunaparaju@nvidia.com>
1 parent 9b9509e commit 595ca2d

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)