- Create SFC Port Pair Group With Two Pairs PG1 PP1 PP2
- Create SFC Port Pair Group PG2 PP3
-
-Create Port Chain
- [Documentation] Create SFC Port Chain using two port groups an classifier created previously
- Create SFC Port Chain PC1 PG1 PG2 FC_http
-
-Start Web Server On Destination VM
- [Documentation] Start a simple web server on the destination VM
- Execute Command on VM Instance @{NETWORKS_NAME}[0] @{NET1_VM_IPS}[4] while true; do echo -e "HTTP/1.0 200 OK\r\nContent-Length: 21\r\n\r\nWelcome to web-server" | sudo nc -l -p 80 ; done &
-
-Add Static Routing On Service Function VMs
- [Documentation] Enable eth1 and add static routing between the ports on the SF VMs
- : FOR ${INDEX} IN RANGE 0 2
- \ Execute Command on VM Instance @{NETWORKS_NAME}[0] @{NET1_VM_IPS}[${INDEX}] sudo sh -c 'echo "auto eth1" >> /etc/network/interfaces'
- \ Execute Command on VM Instance @{NETWORKS_NAME}[0] @{NET1_VM_IPS}[${INDEX}] sudo sh -c 'echo "iface eth1 inet dhcp" >> /etc/network/interfaces'
- \ Execute Command on VM Instance @{NETWORKS_NAME}[0] @{NET1_VM_IPS}[${INDEX}] sudo /etc/init.d/S40network restart
- \ Execute Command on VM Instance @{NETWORKS_NAME}[0] @{NET1_VM_IPS}[${INDEX}] sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
- \ Execute Command on VM Instance @{NETWORKS_NAME}[0] @{NET1_VM_IPS}[${INDEX}] sudo ip route add @{NET1_VM_IPS}[3] dev eth0
- \ Execute Command on VM Instance @{NETWORKS_NAME}[0] @{NET1_VM_IPS}[${INDEX}] sudo ip route add @{NET1_VM_IPS}[4] dev eth1
-
-Connectivity Tests From Vm Instance1 In network_1
- [Documentation] Login to the source VM instance, and send a HTTP GET using curl to the destination VM instance
- # FIXME need to somehow verify it goes through SFs (flows?)
- ${DEST_VM_LIST} Create List @{NET1_VM_IPS}[4]
- Test Operations From Vm Instance network_1 @{NET1_VM_IPS}[3] ${DEST_VM_LIST}
- Execute Command on VM Instance @{NETWORKS_NAME}[0] @{NET1_VM_IPS}[3] curl http://@{NET1_VM_IPS}[4]
+ 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, If the SF handles the traffic, there will be delay causing the time for nc to be higher.
+ 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} cmd_timeout=60s
+ 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} cmd_timeout=60s
+ 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} cmd_timeout=60s
+ 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
+
+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, If the SF handles the traffic, there will be delay causing the time for nc to be higher.
+ 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} cmd_timeout=80s
+ 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} cmd_timeout=80s
+ 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} cmd_timeout=80s
+ 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} cmd_timeout=80s
+ 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