[Documentation] Create One VM instance using given ${port_name} and for given ${compute_node}
${image} Set Variable If "${image}"=="${EMPTY}" ${CIRROS_${OPENSTACK_BRANCH}} ${image}
${port_id}= Get Port Id ${port_name} ${devstack_conn_id}
- ${rc} ${output}= Run And Return Rc And Output openstack server create --image ${image} --flavor ${flavor} --nic port-id=${port_id} ${vm_instance_name} --security-groups ${sg}
+ ${rc} ${output}= Run And Return Rc And Output openstack server create --image ${image} --flavor ${flavor} --nic port-id=${port_id} ${vm_instance_name} --security-group ${sg}
Log ${output}
Create Vm Instance With Ports
Create SFC Flow Classifier
[Arguments] ${name} ${src_ip} ${dest_ip} ${protocol} ${dest_port} ${neutron_src_port}
[Documentation] Create a flow classifier for SFC
- ${cmd}= Set Variable neutron flow-classifier-create --ethertype IPv4 --source-ip-prefix ${src_ip}/32 --destination-ip-prefix ${dest_ip}/32 --protocol ${protocol} --destination-port ${dest_port}:${dest_port} --logical-source-port ${neutron_src_port} ${name}
+ ${cmd}= Set Variable openstack sfc flow classifier create --ethertype IPv4 --source-ip-prefix ${src_ip}/32 --destination-ip-prefix ${dest_ip}/32 --protocol ${protocol} --destination-port ${dest_port}:${dest_port} --logical-source-port ${neutron_src_port} ${name}
Log ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log ${output}
Should Not Be True ${rc}
- Should Contain ${output} Created a new flow_classifier
+ Should Contain ${output} ${name}
[Return] ${output}
Delete SFC Flow Classifier
[Documentation] Delete a SFC flow classifier
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${cmd}= Set Variable neutron flow-classifier-delete ${name}
+ ${cmd}= Set Variable openstack sfc flow classifier delete ${name}
Log ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log ${output}
Should Not Be True ${rc}
- Should Contain ${output} Deleted flow_classifier
[Return] ${output}
Create SFC Port Pair
[Documentation] Creates a neutron port pair for SFC
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${cmd}= Set Variable neutron port-pair-create --ingress=${port_in} --egress=${port_out} ${name}
+ ${cmd}= Set Variable openstack sfc port pair create --ingress=${port_in} --egress=${port_out} ${name}
Log ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log ${output}
Should Not Be True ${rc}
- Should Contain ${output} Created a new port_pair
+ Should Contain ${output} ${name}
[Return] ${output}
Delete SFC Port Pair
[Arguments] ${name}
[Documentation] Delete a SFC port pair
- ${cmd}= Set Variable neutron port-pair-delete ${name}
+ ${cmd}= Set Variable openstack sfc port pair delete ${name}
Log ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log ${output}
Should Not Be True ${rc}
- Should Contain ${output} Deleted port_pair
[Return] ${output}
Create SFC Port Pair Group
[Arguments] ${name} ${port_pair}
[Documentation] Creates a port pair group with a single port pair for SFC
- ${cmd}= Set Variable neutron port-pair-group-create --port-pair ${port_pair} ${name}
+ ${cmd}= Set Variable openstack sfc port pair group create --port-pair ${port_pair} ${name}
Log ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log ${output}
Should Not Be True ${rc}
- Should Contain ${output} Created a new port_pair_group
+ Should Contain ${output} ${name}
[Return] ${output}
Create SFC Port Pair Group With Two Pairs
[Arguments] ${name} ${port_pair1} ${port_pair2}
[Documentation] Creates a port pair group with two port pairs for SFC
- ${cmd}= Set Variable neutron port-pair-group-create --port-pair ${port_pair1} --port-pair ${port_pair2} ${name}
+ ${cmd}= Set Variable openstack sfc port pair group create --port-pair ${port_pair1} --port-pair ${port_pair2} ${name}
Log ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log ${output}
Should Not Be True ${rc}
- Should Contain ${output} Created a new port_pair_group
+ Should Contain ${output} ${name}
[Return] ${output}
Delete SFC Port Pair Group
[Arguments] ${name}
[Documentation] Delete a SFC port pair group
${devstack_conn_id}= Get ControlNode Connection
- ${cmd}= Set Variable neutron port-pair-group-delete ${name}
+ ${cmd}= Set Variable openstack sfc port pair group delete ${name}
Log ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log ${output}
Should Not Be True ${rc}
- Should Contain ${output} Deleted port_pair_group
[Return] ${output}
Create SFC Port Chain
[Arguments] ${name} ${pg1} ${pg2} ${fc}
[Documentation] Creates a port pair chain with two port groups and a singel classifier.
- ${cmd}= Set Variable neutron port-chain-create --port-pair-group ${pg1} --port-pair-group ${pg2} --flow-classifier ${fc} ${name}
+ ${cmd}= Set Variable openstack sfc port chain create --port-pair-group ${pg1} --port-pair-group ${pg2} --flow-classifier ${fc} ${name}
Log ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log ${output}
Should Not Be True ${rc}
- Should Contain ${output} Created a new port_chain
+ Should Contain ${output} ${name}
[Return] ${output}
Delete SFC Port Chain
[Arguments] ${name}
[Documentation] Delete a SFC port chain
- ${cmd}= Set Variable neutron port-chain-delete ${name}
+ ${cmd}= Set Variable openstack sfc port chain delete ${name}
Log ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Log ${output}
Should Not Be True ${rc}
- Should Contain ${output} Deleted port_chain
[Return] ${output}
Reboot Nova VM
Documentation Test suite to verify SFC configuration and packet flows.
Suite Setup BuiltIn.Run Keywords SetupUtils.Setup_Utils_For_Setup_And_Teardown
... AND DevstackUtils.Devstack Suite Setup
-Suite Teardown Close All Connections
+Suite Teardown BuiltIn.Run Keywords Delete Configurations
+... AND Close All Connections
Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
Test Teardown Get Test Teardown Debugs
Library SSHLibrary
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]
-Delete Vm Instances In network_1
- [Documentation] Delete Vm instances using instance names in network_1.
+*** Keywords ***
+Delete Configurations
+ [Documentation] Delete all elements that were created in the test case section. These are done
+ ... in a local keyword so this can be called as part of the Suite Teardown. When called as part
+ ... of the Suite Teardown, all steps will be attempted. This prevents robot framework from bailing
+ ... on the rest of a test case if one step intermittently has trouble and fails. The goal is to attempt
+ ... to leave the test environment as clean as possible upon completion of this suite.
: FOR ${VmElement} IN @{VM_INSTANCES}
\ Delete Vm Instance ${VmElement}
-
-Delete All SFC Objects
- [Documentation] Delete all previously created SFC objects
Delete SFC Port Chain PC1
Delete SFC Port Pair Group PG1
Delete SFC Port Pair Group PG2
Delete SFC Port Pair PP2
Delete SFC Port Pair PP3
Delete SFC Flow Classifier FC_http
-
-Delete Neutron Ports
- [Documentation] Delete neutron ports that were used for SFC VMs
: FOR ${port} IN @{PORTS}
\ Delete Port ${port}
-
-Delete Sub Networks In network_1
- [Documentation] Delete Sub Nets for the Networks with neutron request.
Delete SubNet l2_subnet_1
-
-Delete Networks
- [Documentation] Delete Networks with neutron request.
: FOR ${NetworkElement} IN @{NETWORKS_NAME}
\ Delete Network ${NetworkElement}