2 Documentation Test suite to verify SFC configuration and packet flows.
5 Library OperatingSystem
6 Library RequestsLibrary
7 Resource ../../../libraries/DevstackUtils.robot
8 Resource ../../../libraries/LiveMigration.robot
9 Resource ../../../libraries/OpenStackOperations.robot
10 Resource ../../../libraries/SetupUtils.robot
11 Resource ../../../libraries/Utils.robot
12 Resource ../../../libraries/KarafKeywords.robot
14 Suite Setup Suite Setup
15 Suite Teardown OpenStackOperations.OpenStack Suite Teardown
16 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
17 Test Teardown BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
18 ... AND OpenStackOperations.Get Test Teardown Debugs For SFC
22 ${SECURITY_GROUP} sg-sfc
24 @{SUBNETS} l2_subnet_1
25 @{NET_1_VMS} sf1 sourcevm destvm
26 @{NON_SF_VMS} sourcevm destvm
27 @{SUBNET_CIDRS} 30.0.0.0/24
28 @{PORTS} p1in p1out source_vm_port dest_vm_port
29 ${NC_COMMAND} nc -zv -w 5
31 ${RES_FAILURE} Operation timed out
32 ${WEBSERVER_80} (python -m SimpleHTTPServer 80 > /dev/null 2>&1 &)
33 ${WEBSERVER_81} (python -m SimpleHTTPServer 81 > /dev/null 2>&1 &)
34 ${WEBSERVER_82} (python -m SimpleHTTPServer 82 > /dev/null 2>&1 &)
35 ${WEBSERVER_83} (python -m SimpleHTTPServer 83 > /dev/null 2>&1 &)
36 ${WEBSERVER_84} (python -m SimpleHTTPServer 84 > /dev/null 2>&1 &)
37 ${WEBSERVER_85} (python -m SimpleHTTPServer 85 > /dev/null 2>&1 &)
38 ${WEBSERVER_100} (python -m SimpleHTTPServer 100 > /dev/null 2>&1 &)
39 ${WEBSERVER_101} (python -m SimpleHTTPServer 101 > /dev/null 2>&1 &)
40 ${WEBSERVER_102} (python -m SimpleHTTPServer 102 > /dev/null 2>&1 &)
41 ${WEBSERVER_103} (python -m SimpleHTTPServer 103 > /dev/null 2>&1 &)
43 ... ${WEBSERVER_80} && ${WEBSERVER_81} && ${WEBSERVER_82} && ${WEBSERVER_83} && ${WEBSERVER_84} && ${WEBSERVER_85} && ${WEBSERVER_100} && ${WEBSERVER_101} && ${WEBSERVER_102} && ${WEBSERVER_103}
44 ${CLOUD_IMAGE} "https://artifacts.opnfv.org/sfc/images/sfc_nsh_fraser.qcow2"
45 ${CLOUD_IMAGE_NAME} sfc_nsh_fraser
46 ${CLOUD_FLAVOR_NAME} sfc_nsh_fraser
49 ${CLOUD_IMAGE_USER} root
50 ${CLOUD_IMAGE_PASS} opnfv
51 ${CLOULD_IMAGE_CONSOLE} root
55 Create Flow Classifiers For Basic Test
56 [Documentation] Create SFC Flow Classifier for TCP traffic between source VM and destination VM
57 OpenStackOperations.Create SFC Flow Classifier
63 ... args=--destination-port 80:80
64 OpenStackOperations.Create SFC Flow Classifier
70 ... args=--destination-port 81:81
71 OpenStackOperations.Create SFC Flow Classifier
77 ... args=--destination-port 83:85
80 [Documentation] Create SFC Port Pairs
81 OpenStackOperations.Create SFC Port Pair SFPP1 p1in p1out
83 Create Port Pair Groups
84 [Documentation] Create SFC Port Pair Groups
85 OpenStackOperations.Create SFC Port Pair Group SFPPG1 SFPP1
87 Test Communication From Vm Instance1 In net_1 No SF
88 [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.
89 ${DEST_VM_LIST} BuiltIn.Create List ${NET1_VM_IPS}[1]
90 ${nc_resp} OpenStackOperations.Execute Command on VM Instance
93 ... ${NC_COMMAND} ${NET1_VM_IPS}[1] 80
94 ... user=${CLOUD_IMAGE_USER}
95 ... password=${CLOUD_IMAGE_PASS}
96 ... console=${CLOULD_IMAGE_CONSOLE}
97 BuiltIn.Should Contain ${nc_resp} ${RES_SUCCESS}
98 ${nc_resp} OpenStackOperations.Execute Command on VM Instance
100 ... ${NET1_VM_IPS}[0]
101 ... ${NC_COMMAND} ${NET1_VM_IPS}[1] 81
102 ... user=${CLOUD_IMAGE_USER}
103 ... password=${CLOUD_IMAGE_PASS}
104 ... console=${CLOULD_IMAGE_CONSOLE}
105 BuiltIn.Should Contain ${nc_resp} ${RES_SUCCESS}
106 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
107 ... AND OpenStackOperations.Get Test Teardown Debugs For SFC
108 ... AND OpenStackOperations.Exit From Vm Console
110 Create Port Chain For Src->Dest Port 80
111 [Documentation] Create SFC Port Chain using port group and classifier created previously
112 OpenStackOperations.Create SFC Port Chain SFPC1 args=--port-pair-group SFPPG1 --flow-classifier FC_80
114 Test Communication From Vm Instance1 In net_1 Port 80 via SF
115 [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.
116 Start Vxlan Tool in SF
119 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
120 Wait Until Keyword Succeeds
123 ... Check Network Reachability
125 ... ${NET1_VM_IPS}[0]
129 Wait Until Keyword Succeeds
132 ... Check Network Reachability
134 ... ${NET1_VM_IPS}[0]
138 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
139 Start Vxlan Tool in SF
142 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80
143 BuiltIn.Comment Port 80 communication should fail as the SF blocks the same
144 Wait Until Keyword Succeeds
147 ... Check Network Reachability
149 ... ${NET1_VM_IPS}[0]
153 BuiltIn.Comment Test to confirm Port 81 is not blocked
154 Wait Until Keyword Succeeds
157 ... Check Network Reachability
159 ... ${NET1_VM_IPS}[0]
163 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
164 Start Vxlan Tool in SF
167 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 81
168 Wait Until Keyword Succeeds
171 ... Check Network Reachability
173 ... ${NET1_VM_IPS}[0]
177 Wait Until Keyword Succeeds
180 ... Check Network Reachability
182 ... ${NET1_VM_IPS}[0]
186 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
187 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
188 ... AND OpenStackOperations.Get Test Teardown Debugs For SFC
189 ... AND OpenStackOperations.Exit From Vm Console
191 Update Port Chain To Use Flow Classifier For Port 81
192 [Documentation] Update Port Chain to use FC_81 instead of FC_80
193 OpenStackOperations.Update SFC Port Chain With A New Flow Classifier SFPC1 FC_81
194 OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier SFPC1 FC_80
196 Test Communication From Vm Instance1 In net_1 Port 81 via SF
197 [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance.
198 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
199 Start Vxlan Tool in SF
202 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
203 Wait Until Keyword Succeeds
206 ... Check Network Reachability
208 ... ${NET1_VM_IPS}[0]
212 Wait Until Keyword Succeeds
215 ... Check Network Reachability
217 ... ${NET1_VM_IPS}[0]
221 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
222 Start Vxlan Tool in SF
225 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 81
226 BuiltIn.Comment Port 81 communication should fail as the SF blocks the same
227 Wait Until Keyword Succeeds
230 ... Check Network Reachability
232 ... ${NET1_VM_IPS}[0]
236 Wait Until Keyword Succeeds
239 ... Check Network Reachability
241 ... ${NET1_VM_IPS}[0]
245 BuiltIn.Comment Test to confirm Port 80 does not continue to get routed through SF
246 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
247 Start Vxlan Tool in SF
250 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80
251 Wait Until Keyword Succeeds
254 ... Check Network Reachability
256 ... ${NET1_VM_IPS}[0]
260 Wait Until Keyword Succeeds
263 ... Check Network Reachability
265 ... ${NET1_VM_IPS}[0]
269 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
270 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
271 ... AND OpenStackOperations.Get Test Teardown Debugs For SFC
272 ... AND OpenStackOperations.Exit From Vm Console
274 Update Port Chain To Use Flow Classifier For Port Range 83-85
275 [Documentation] Update Port Chain to use FC_83_85
276 OpenStackOperations.Update SFC Port Chain With A New Flow Classifier SFPC1 FC_83_85
278 Test Communication From Vm Instance1 In net_1 Port 84 And 85 via SF
279 [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance.
280 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
281 Start Vxlan Tool in SF
284 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
285 Wait Until Keyword Succeeds
288 ... Check Network Reachability
290 ... ${NET1_VM_IPS}[0]
294 Wait Until Keyword Succeeds
297 ... Check Network Reachability
299 ... ${NET1_VM_IPS}[0]
303 Wait Until Keyword Succeeds
306 ... Check Network Reachability
308 ... ${NET1_VM_IPS}[0]
312 Wait Until Keyword Succeeds
315 ... Check Network Reachability
317 ... ${NET1_VM_IPS}[0]
321 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
322 Start Vxlan Tool in SF
325 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 83
326 BuiltIn.Comment Port 83 communication should fail as the SF blocks the same
327 Wait Until Keyword Succeeds
330 ... Check Network Reachability
332 ... ${NET1_VM_IPS}[0]
336 Wait Until Keyword Succeeds
339 ... Check Network Reachability
341 ... ${NET1_VM_IPS}[0]
345 Wait Until Keyword Succeeds
348 ... Check Network Reachability
350 ... ${NET1_VM_IPS}[0]
354 Wait Until Keyword Succeeds
357 ... Check Network Reachability
359 ... ${NET1_VM_IPS}[0]
363 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
364 Start Vxlan Tool in SF
367 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 84
368 BuiltIn.Comment Port 84 communication should fail as the SF blocks the same
369 Wait Until Keyword Succeeds
372 ... Check Network Reachability
374 ... ${NET1_VM_IPS}[0]
378 Wait Until Keyword Succeeds
381 ... Check Network Reachability
383 ... ${NET1_VM_IPS}[0]
387 Wait Until Keyword Succeeds
390 ... Check Network Reachability
392 ... ${NET1_VM_IPS}[0]
396 Wait Until Keyword Succeeds
399 ... Check Network Reachability
401 ... ${NET1_VM_IPS}[0]
405 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
406 Start Vxlan Tool in SF
409 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 85
410 BuiltIn.Comment Port 85 communication should fail as the SF blocks the same
411 Wait Until Keyword Succeeds
414 ... Check Network Reachability
416 ... ${NET1_VM_IPS}[0]
420 Wait Until Keyword Succeeds
423 ... Check Network Reachability
425 ... ${NET1_VM_IPS}[0]
429 Wait Until Keyword Succeeds
432 ... Check Network Reachability
434 ... ${NET1_VM_IPS}[0]
438 Wait Until Keyword Succeeds
441 ... Check Network Reachability
443 ... ${NET1_VM_IPS}[0]
447 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
448 Start Vxlan Tool in SF
451 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 80
452 Wait Until Keyword Succeeds
455 ... Check Network Reachability
457 ... ${NET1_VM_IPS}[0]
461 Wait Until Keyword Succeeds
464 ... Check Network Reachability
466 ... ${NET1_VM_IPS}[0]
470 Wait Until Keyword Succeeds
473 ... Check Network Reachability
475 ... ${NET1_VM_IPS}[0]
479 Wait Until Keyword Succeeds
482 ... Check Network Reachability
484 ... ${NET1_VM_IPS}[0]
489 Update Port Chain To Use Flow Classifier For Input Port Range 101-103
490 [Documentation] Update Port Chain to use FC_101_103
491 BuiltIn.Comment Removing and Deleting Existing Conflicting Flow Classifiers
492 OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier SFPC1 FC_81
493 OpenStackOperations.Update SFC Port Chain Removing A Flow Classifier SFPC1 FC_83_85
494 OpenStackOperations.Delete SFC Flow Classifier FC_80
495 OpenStackOperations.Delete SFC Flow Classifier FC_81
496 OpenStackOperations.Delete SFC Flow Classifier FC_83_85
497 OpenStackOperations.Create SFC Flow Classifier
499 ... ${NET1_VM_IPS}[0]
500 ... ${NET1_VM_IPS}[1]
503 ... args=--source-port 101:103
504 OpenStackOperations.Update SFC Port Chain With A New Flow Classifier SFPC1 FC_101_103
506 Test Communication From Vm Instance1 In net_1 Port 100 And 102 via SF
507 [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance.
508 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
509 Start Vxlan Tool in SF
512 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
513 Wait Until Keyword Succeeds
516 ... Check Network Reachability
518 ... ${NET1_VM_IPS}[0]
519 ... ${NC_COMMAND} -p 80
522 Wait Until Keyword Succeeds
525 ... Check Network Reachability
527 ... ${NET1_VM_IPS}[0]
528 ... ${NC_COMMAND} -p 100
531 Wait Until Keyword Succeeds
534 ... Check Network Reachability
536 ... ${NET1_VM_IPS}[0]
537 ... ${NC_COMMAND} -p 101
540 Wait Until Keyword Succeeds
543 ... Check Network Reachability
545 ... ${NET1_VM_IPS}[0]
546 ... ${NC_COMMAND} -p 102
549 Wait Until Keyword Succeeds
552 ... Check Network Reachability
554 ... ${NET1_VM_IPS}[0]
555 ... ${NC_COMMAND} -p 103
558 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
559 Start Vxlan Tool in SF
562 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 83
563 Wait Until Keyword Succeeds
566 ... Check Network Reachability
568 ... ${NET1_VM_IPS}[0]
569 ... ${NC_COMMAND} -p 80
572 Wait Until Keyword Succeeds
575 ... Check Network Reachability
577 ... ${NET1_VM_IPS}[0]
578 ... ${NC_COMMAND} -p 100
581 Wait Until Keyword Succeeds
584 ... Check Network Reachability
586 ... ${NET1_VM_IPS}[0]
587 ... ${NC_COMMAND} -p 101
590 Wait Until Keyword Succeeds
593 ... Check Network Reachability
595 ... ${NET1_VM_IPS}[0]
596 ... ${NC_COMMAND} -p 102
599 Wait Until Keyword Succeeds
602 ... Check Network Reachability
604 ... ${NET1_VM_IPS}[0]
605 ... ${NC_COMMAND} -p 103
609 Delete And Recreate Port Chain And Flow Classifiers For Symmetric Test
610 OpenStackOperations.Create SFC Flow Classifier
612 ... ${NET1_VM_IPS}[0]
613 ... ${NET1_VM_IPS}[1]
616 ... args=--destination-port 82:82 --source-port 2000 --logical-destination-port dest_vm_port
617 OpenStackOperations.Delete SFC Port Chain SFPC1
618 OpenStackOperations.Create SFC Port Chain
620 ... args=--port-pair-group SFPPG1 --flow-classifier FC_SYM --chain-parameters symmetric=true
622 Test Communication From Vm Instance1 For Symmetric Chain
623 [Documentation] Login to the source VM instance, and send a nc req to the destination VM instance.
624 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
625 Start Vxlan Tool in SF
628 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
629 Start Vxlan Tool in SF
632 ... args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off
633 Wait Until Keyword Succeeds
636 ... Check Network Reachability
638 ... ${NET1_VM_IPS}[0]
639 ... ${NC_COMMAND} -p 2000
642 BuiltIn.Comment Test to confirm the SRC->DEST Port 82 is routed through SF
643 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
644 Start Vxlan Tool in SF
647 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off --block 82
648 Start Vxlan Tool in SF
651 ... args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off
652 Wait Until Keyword Succeeds
655 ... Check Network Reachability
657 ... ${NET1_VM_IPS}[0]
658 ... ${NC_COMMAND} -p 2000
661 BuiltIn.Comment Test to confirm DEST->SRC Port 2000 path SFC traversal
662 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
663 Start Vxlan Tool in SF
666 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
667 Start Vxlan Tool in SF
670 ... args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off --block 2000
671 Wait Until Keyword Succeeds
674 ... Check Network Reachability
676 ... ${NET1_VM_IPS}[0]
677 ... ${NC_COMMAND} -p 2000
680 BuiltIn.Comment Test to confirm the Normalcy restored
681 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
682 Start Vxlan Tool in SF
685 ... args=--do forward --interface ${ETH_IN} --output ${ETH_OUT} --verbose off
686 Start Vxlan Tool in SF
689 ... args=--do forward --interface ${ETH_OUT} --output ${ETH_IN} --verbose off
690 Wait Until Keyword Succeeds
693 ... Check Network Reachability
695 ... ${NET1_VM_IPS}[0]
696 ... ${NC_COMMAND} -p 2000
699 Stop Vxlan Tool in SF ${NETWORKS}[0] ${SF1_IP}
700 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Get Test Teardown Debugs
701 ... AND OpenStackOperations.Get Test Teardown Debugs For SFC
702 ... AND OpenStackOperations.Exit From Vm Console
704 Delete Configurations
705 [Documentation] Delete all elements that were created in the test case section. These are done
706 ... in a local keyword so this can be called as part of the Suite Teardown. When called as part
707 ... of the Suite Teardown, all steps will be attempted. This prevents robot framework from bailing
708 ... on the rest of a test case if one step intermittently has trouble and fails. The goal is to attempt
709 ... to leave the test environment as clean as possible upon completion of this suite.
710 FOR ${vm} IN @{NET_1_VMS}
711 OpenStackOperations.Delete Vm Instance ${vm}
713 OpenStackOperations.Delete SFC Port Chain SFPSYM
714 OpenStackOperations.Delete SFC Port Pair Group SFPPG1
715 OpenStackOperations.Delete SFC Port Pair SFPP1
716 OpenStackOperations.Delete SFC Flow Classifier FC_101_103
717 OpenStackOperations.Delete SFC Flow Classifier FC_SYM
718 FOR ${port} IN @{PORTS}
719 OpenStackOperations.Delete Port ${port}
721 OpenStackOperations.Delete SubNet l2_subnet_1
722 FOR ${network} IN @{NETWORKS}
723 OpenStackOperations.Delete Network ${network}
725 OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
730 OpenStackOperations.OpenStack Suite Setup
731 Create Basic Networks
732 Create Ports For Testing
733 Create Instances For Testing
734 Check Vm Instances Have Ip Address And Ready For Test
735 Start Applications on VM Instances For Test
737 Create Basic Networks
738 BuiltIn.Comment Create Network For Testing
739 OpenStackOperations.Create Network ${NETWORKS}[0]
740 BuiltIn.Comment Create Subnet For Testing
741 OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS}[0] ${SUBNET_CIDRS}[0]
742 OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
743 BuiltIn.Comment Create Neutron Ports with no port security for SFC Tests
744 OpenStackOperations.Get Suite Debugs
746 Create Ports For Testing
747 FOR ${port} IN @{PORTS}
748 OpenStackOperations.Create Port ${NETWORKS}[0] ${port} sg=${SECURITY_GROUP}
750 OpenStackOperations.Update Port p1in additional_args=--no-security-group
751 OpenStackOperations.Update Port p1in additional_args=--disable-port-security
752 OpenStackOperations.Update Port p1out additional_args=--no-security-group
753 OpenStackOperations.Update Port p1out additional_args=--disable-port-security
754 OpenStackOperations.Get Suite Debugs
756 Create Instances For Testing
757 ${SF_COMP_HOST} BuiltIn.Set Variable If 2 < ${NUM_OS_SYSTEM} ${OS_CMP2_HOSTNAME} ${OS_CMP1_HOSTNAME}
758 OpenStackOperations.Add New Image From Url ${CLOUD_IMAGE} ${CLOUD_IMAGE_NAME}
759 OpenStackOperations.Create Flavor ${CLOUD_FLAVOR_NAME} 512 1
760 OpenStackOperations.Create Vm Instance With Ports On Compute Node
765 ... image=${CLOUD_IMAGE_NAME}
766 ... flavor=${CLOUD_FLAVOR_NAME}
767 ... sg=${SECURITY_GROUP}
768 OpenStackOperations.Create Vm Instance With Port On Compute Node
771 ... ${OS_CMP1_HOSTNAME}
772 ... image=${CLOUD_IMAGE_NAME}
773 ... flavor=${CLOUD_FLAVOR_NAME}
774 ... sg=${SECURITY_GROUP}
775 OpenStackOperations.Create Vm Instance With Port On Compute Node
778 ... ${OS_CMP1_HOSTNAME}
779 ... image=${CLOUD_IMAGE_NAME}
780 ... flavor=${CLOUD_FLAVOR_NAME}
781 ... sg=${SECURITY_GROUP}
782 OpenStackOperations.Show Debugs @{NET_1_VMS}
783 OpenStackOperations.Get Suite Debugs
785 Check Vm Instances Have Ip Address And Ready For Test
786 OpenStackOperations.Poll VM Is ACTIVE sf1
787 OpenStackOperations.Poll VM Is ACTIVE sourcevm
788 OpenStackOperations.Poll VM Is ACTIVE destvm
789 ${sfc1_mac} OpenStackOperations.Get Port Mac p1in
790 ${SF1_IP} OpenStackOperations.Get Port Ip p1in
791 BuiltIn.Wait Until Keyword Succeeds
794 ... OpenStackOperations.Verify If Instance Is Arpingable From Dhcp Namespace
798 ${src_mac} OpenStackOperations.Get Port Mac source_vm_port
799 ${src_ip} OpenStackOperations.Get Port Ip source_vm_port
800 BuiltIn.Wait Until Keyword Succeeds
803 ... OpenStackOperations.Verify If Instance Is Arpingable From Dhcp Namespace
807 ${dest_mac} OpenStackOperations.Get Port Mac dest_vm_port
808 ${dest_ip} OpenStackOperations.Get Port Ip dest_vm_port
809 BuiltIn.Wait Until Keyword Succeeds
812 ... OpenStackOperations.Verify If Instance Is Arpingable From Dhcp Namespace
816 BuiltIn.Comment If the Tests reach this point, all the Instances are reachable.
817 ${NET1_VM_IPS} BuiltIn.Create List ${src_ip} ${dest_ip}
818 BuiltIn.Set Suite Variable @{NET1_VM_IPS}
819 BuiltIn.Set Suite Variable ${SF1_IP}
820 BuiltIn.Set Suite Variable ${OS_SYSTEM_PROMPT} \#
821 BuiltIn.Wait Until Keyword Succeeds
824 ... OpenStackOperations.Check If Instance Is Ready For Ssh Login Using Password
827 ... user=${CLOUD_IMAGE_USER}
828 ... password=${CLOUD_IMAGE_PASS}
829 ... console=${CLOULD_IMAGE_CONSOLE}
830 BuiltIn.Wait Until Keyword Succeeds
833 ... OpenStackOperations.Check If Instance Is Ready For Ssh Login Using Password
835 ... ${NET1_VM_IPS}[0]
836 ... user=${CLOUD_IMAGE_USER}
837 ... password=${CLOUD_IMAGE_PASS}
838 ... console=${CLOULD_IMAGE_CONSOLE}
839 BuiltIn.Wait Until Keyword Succeeds
842 ... OpenStackOperations.Check If Instance Is Ready For Ssh Login Using Password
844 ... ${NET1_VM_IPS}[1]
845 ... user=${CLOUD_IMAGE_USER}
846 ... password=${CLOUD_IMAGE_PASS}
847 ... console=${CLOULD_IMAGE_CONSOLE}
848 OpenStackOperations.Show Debugs @{NET_1_VMS}
849 OpenStackOperations.Get Suite Debugs
851 Start Applications on VM Instances For Test
852 BuiltIn.Comment Run Web server Scripts on destination vm listening to 80,81 and 82 ports
853 ${resp} OpenStackOperations.Execute Command on VM Instance
855 ... ${NET1_VM_IPS}[1]
856 ... ${WEBSERVER_CMDS} && (echo done)
857 ... user=${CLOUD_IMAGE_USER}
858 ... password=${CLOUD_IMAGE_PASS}
859 ... console=${CLOULD_IMAGE_CONSOLE}
860 BuiltIn.Should Contain ${resp} done
862 Start Vxlan Tool in SF
863 [Documentation] Starts the tool in the SF VM's
864 [Arguments] ${network} ${sf_vm_ip} ${args}=${EMPTY}
865 OpenStackOperations.Execute Command on VM Instance
868 ... nohup python vxlan_tool.py ${args} &
869 ... user=${CLOUD_IMAGE_USER}
870 ... password=${CLOUD_IMAGE_PASS}
871 ... console=${CLOULD_IMAGE_CONSOLE}
873 Stop Vxlan Tool in SF
874 [Documentation] Starts the tool in the SF VM's
875 [Arguments] ${network} ${sf_vm_ip}
876 OpenStackOperations.Execute Command on VM Instance
880 ... user=${CLOUD_IMAGE_USER}
881 ... password=${CLOUD_IMAGE_PASS}
882 ... console=${CLOULD_IMAGE_CONSOLE}
884 Check Network Reachability
885 [Arguments] ${net_name} ${source_vm_ip} ${command} ${port} ${ret_code} ${cmd_timeout}=30s
886 ${nc_resp} OpenStackOperations.Execute Command on VM Instance
889 ... ${command} ${NET1_VM_IPS}[1] ${port}
890 ... cmd_timeout=${cmd_timeout}
891 ... user=${CLOUD_IMAGE_USER}
892 ... password=${CLOUD_IMAGE_PASS}
893 ... console=${CLOULD_IMAGE_CONSOLE}
894 BuiltIn.Should Contain ${nc_resp} ${ret_code}