From 75ea2c825f858b22f79ad1535b733f4a72fd125a Mon Sep 17 00:00:00 2001 From: "Sridhar K. N. Rao" Date: Wed, 4 May 2022 00:18:03 +0530 Subject: [Core] Minor Updates to the flow. This patch adds minor updates to the flow. 1. Add license Information 2. Remove spaces. Signed-off-by: Sridhar K. N. Rao Change-Id: I805ee93afc5c7b1c7c157dad643b9ddac2d4d55d --- testcases/testcase.py | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'testcases/testcase.py') diff --git a/testcases/testcase.py b/testcases/testcase.py index 13ada1cc..12d71bc5 100644 --- a/testcases/testcase.py +++ b/testcases/testcase.py @@ -640,19 +640,28 @@ class TestCase(object): if S.getValue('K8S') and 'sriov' not in S.getValue('PLUGIN'): if 'Ovs' in S.getValue('VSWITCH'): # Add OVS Flows - logging.info("Kubernetes: Adding OVS Connections") - flow = {'table':'0', 'in_port':'1', - 'idle_timeout':'0', 'actions': ['output:3']} - vswitch.add_flow(bridge, flow) - flow = {'table':'0', 'in_port':'3', - 'idle_timeout':'0', 'actions': ['output:1']} - vswitch.add_flow(bridge, flow) - flow = {'table':'0', 'in_port':'2', - 'idle_timeout':'0', 'actions': ['output:4']} - vswitch.add_flow(bridge, flow) - flow = {'table':'0', 'in_port':'4', - 'idle_timeout':'0', 'actions': ['output:2']} - vswitch.add_flow(bridge, flow) + if S.getValue('USCNI_INTERFACE_PAIRS') == 1: + logging.info("Kubernetes: Adding 1-Pair OVS Connections") + flow = {'table':'0', 'in_port':'1', + 'idle_timeout':'0', 'actions': ['output:2']} + vswitch.add_flow(bridge, flow) + flow = {'table':'0', 'in_port':'2', + 'idle_timeout':'0', 'actions': ['output:1']} + vswitch.add_flow(bridge, flow) + elif S.getValue('USCNI_INTERFACE_PAIRS') == 2: + logging.info("Kubernetes: Adding 2-Pairs OVS Connections") + flow = {'table':'0', 'in_port':'1', + 'idle_timeout':'0', 'actions': ['output:3']} + vswitch.add_flow(bridge, flow) + flow = {'table':'0', 'in_port':'3', + 'idle_timeout':'0', 'actions': ['output:1']} + vswitch.add_flow(bridge, flow) + flow = {'table':'0', 'in_port':'2', + 'idle_timeout':'0', 'actions': ['output:4']} + vswitch.add_flow(bridge, flow) + flow = {'table':'0', 'in_port':'4', + 'idle_timeout':'0', 'actions': ['output:2']} + vswitch.add_flow(bridge, flow) elif 'vpp' in S.getValue('VSWITCH'): phy_ports = vswitch.get_ports() virt_port0 = 'memif1/0' -- cgit 1.2.3-korg