+ OpenStackOperations.Create SFC Port Pair Group SFPPG1 SFPP1
+
+Test Communication From Vm Instance1 In net_1 No SF
+ [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance, If the SF handles the traffic, there will be delay causing the time for nc to be higher.
+ ${DEST_VM_LIST} BuiltIn.Create List @{NET1_VM_IPS}[1]
+ ${nc_resp} OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} @{NET1_VM_IPS}[1] 80 user=${CLOUD_IMAGE_USER} password=${CLOUD_IMAGE_PASS}
+ ... console=${CLOULD_IMAGE_CONSOLE}
+ BuiltIn.Should Contain ${nc_resp} ${RES_SUCCESS}
+ ${nc_resp} OpenStackOperations.Execute Command on VM Instance @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} @{NET1_VM_IPS}[1] 81 user=${CLOUD_IMAGE_USER} password=${CLOUD_IMAGE_PASS}
+ ... console=${CLOULD_IMAGE_CONSOLE}
+ BuiltIn.Should Contain ${nc_resp} ${RES_SUCCESS}
+ [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
+ ... AND OpenStackOperations.Get Test Teardown Debugs For SFC
+ ... AND OpenStackOperations.Exit From Vm Console
+
+Create Port Chain For Src->Dest Port 80
+ [Documentation] Create SFC Port Chain using port group and classifier created previously
+ OpenStackOperations.Create SFC Port Chain SFPC1 args=--port-pair-group SFPPG1 --flow-classifier FC_80
+
+Test Communication From Vm Instance1 In net_1 Port 80 via SF
+ [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance, If the SF handles the traffic, there will be delay causing the time for nc to be higher.
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 81 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80
+ BuiltIn.Comment Port 80 communication should fail as the SF blocks the same
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_FAILURE}
+ BuiltIn.Comment Test to confirm Port 81 is not blocked
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 81 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 81
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 81 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
+ ... AND OpenStackOperations.Get Test Teardown Debugs For SFC
+ ... AND OpenStackOperations.Exit From Vm Console
+
+Update Port Chain To Use Flow Classifier For Port 81
+ [Documentation] Update Port Chain to use FC_81 instead of FC_80
+ OpenStackOperations.Update SFC Port Chain With A New Flow Classifier SFPC1 FC_81
+ OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier SFPC1 FC_80
+
+Test Communication From Vm Instance1 In net_1 Port 81 via SF
+ [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance.
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 81 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 81
+ BuiltIn.Comment Port 81 communication should fail as the SF blocks the same
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 81 ${RES_FAILURE}
+ BuiltIn.Comment Test to confirm Port 80 does not continue to get routed through SF
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 81 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
+ ... AND OpenStackOperations.Get Test Teardown Debugs For SFC
+ ... AND OpenStackOperations.Exit From Vm Console
+
+Update Port Chain To Use Flow Classifier For Port Range 83-85
+ [Documentation] Update Port Chain to use FC_83_85
+ OpenStackOperations.Update SFC Port Chain With A New Flow Classifier SFPC1 FC_83_85
+
+Test Communication From Vm Instance1 In net_1 Port 84 And 85 via SF
+ [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance.
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 84 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 85 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 83
+ BuiltIn.Comment Port 83 communication should fail as the SF blocks the same
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 83 ${RES_FAILURE}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 84 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 85 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 84
+ BuiltIn.Comment Port 84 communication should fail as the SF blocks the same
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 84 ${RES_FAILURE}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 85 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 85
+ BuiltIn.Comment Port 85 communication should fail as the SF blocks the same
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 84 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 85 ${RES_FAILURE}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 80 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 84 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND}
+ ... 85 ${RES_SUCCESS}
+
+Update Port Chain To Use Flow Classifier For Input Port Range 101-103
+ [Documentation] Update Port Chain to use FC_101_103
+ BuiltIn.Comment Removing and Deleting Existing Conflicting Flow Classifiers
+ OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier SFPC1 FC_81
+ OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier SFPC1 FC_83_85
+ OpenStackOperations.Delete SFC Flow Classifier FC_80
+ OpenStackOperations.Delete SFC Flow Classifier FC_81
+ OpenStackOperations.Delete SFC Flow Classifier FC_83_85
+ OpenStackOperations.Create SFC Flow Classifier FC_101_103 @{NET1_VM_IPS}[0] @{NET1_VM_IPS}[1] tcp source_vm_port args=--source-port 101:103
+ OpenStackOperations.Update SFC Port Chain With A New Flow Classifier SFPC1 FC_101_103
+
+Test Communication From Vm Instance1 In net_1 Port 100 And 102 via SF
+ [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance.
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 80
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 100
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 101
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 102
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 103
+ ... 83 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 83
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 80
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 100
+ ... 83 ${RES_SUCCESS}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 101
+ ... 83 ${RES_FAILURE}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 102
+ ... 83 ${RES_FAILURE}
+ Wait Until Keyword Succeeds 3x 10s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 103
+ ... 83 ${RES_FAILURE}
+
+Delete And Recreate Port Chain And Flow Classifiers For Symmetric Test
+ OpenStackOperations.Create SFC Flow Classifier FC_SYM @{NET1_VM_IPS}[0] @{NET1_VM_IPS}[1] tcp source_vm_port args=--destination-port 82:82 --source-port 2000 --logical-destination-port dest_vm_port
+ OpenStackOperations.Delete SFC Port Chain SFPC1
+ OpenStackOperations.Create SFC Port Chain SFPSYM args=--port-pair-group SFPPG1 --flow-classifier FC_SYM --chain-parameters symmetric=true
+
+Test Communication From Vm Instance1 For Symmetric Chain
+ [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance.
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off
+ Wait Until Keyword Succeeds 8x 20s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 2000
+ ... 82 ${RES_SUCCESS}
+ BuiltIn.Comment Test to confirm the SRC->DEST Port 82 is routed through SF
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 82
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off
+ Wait Until Keyword Succeeds 8x 20s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 2000
+ ... 82 ${RES_FAILURE}
+ BuiltIn.Comment Test to confirm DEST->SRC Port 2000 path SFC traversal
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off --block 2000
+ Wait Until Keyword Succeeds 8x 20s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 2000
+ ... 82 ${RES_FAILURE}
+ BuiltIn.Comment Test to confirm the Normalcy restored
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
+ Start Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP} args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off
+ Wait Until Keyword Succeeds 8x 20s Check Network Reachability @{NETWORKS}[0] @{NET1_VM_IPS}[0] ${NC_COMMAND} -p 2000
+ ... 82 ${RES_SUCCESS}
+ Stop Vxlan Tool in SF @{NETWORKS}[0] ${SF1_IP}
+ [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
+ ... AND OpenStackOperations.Get Test Teardown Debugs For SFC
+ ... AND OpenStackOperations.Exit From Vm Console