BuiltIn.Should_Be_Equal ${response.status_code} ${200} Got status: ${response.status_code} and message: ${response.text}
# TODO: The following line can be insecure. Should we use regexp instead?
# TODO: beware of new releases (carbon ...) and mind if more counters are used
- ${count} = BuiltIn.Run Keyword If "${ODL_STREAM}" in ["beryllium", "stable-lithium"] BuiltIn.Evaluate ${response.text}["data-change-counter"]["count"]
- ... ELSE BuiltIn.Evaluate ${response.text}["data-change-counter"]["counter"][0]["count"]
+ ${count} = BuiltIn.Run Keyword If "${ODL_STREAM}" in ["beryllium", "stable-lithium"] BuiltIn.Evaluate ${response.text}["data-change-counter"]["count"]
+ ... ELSE BuiltIn.Evaluate ${response.text}["data-change-counter"]["counter"][0]["count"]
[Return] ${count}
Reconfigure_Topology_Name
... ${controller_index} and check the data is replicated in all instances in ${controller_index_list}.
${expected_body}= Hsf Json ${body}
Log ${body}
- ${resp} Run Keyword If "${create_method}" == "POST" RequestsLibrary.Post Request controller${controller_index} ${uri} data=${body} headers=${HEADERS}
+ ${resp} Run Keyword If "${create_method}" == "POST" RequestsLibrary.Post Request controller${controller_index} ${uri} data=${body}
+ ... headers=${HEADERS}
... ELSE RequestsLibrary.Put Request controller${controller_index} ${uri} data=${body} headers=${HEADERS_YANG_JSON}
Log ${resp.content}
Log ${resp.status_code}
Wait Until Keyword Succeeds 5s 1s ClusterKeywords.Check Item Occurrence At URI In Cluster ${controller_index_list} ${dictionary_operational} ${OPERATIONAL_TOPO_API}
Create Sample Tap Device
- [Documentation] Create Tap Device vport1 and vport2 to add to the bridge br-s1 using OVS command.
+ [Documentation] Create Tap Device vport1 and vport2 to add to the bridge br-s1 using OVS command.
Utils.Run Command On Mininet ${TOOLS_SYSTEM_IP} ip tuntap add mode tap vport1
Utils.Run Command On Mininet ${TOOLS_SYSTEM_IP} ip tuntap add mode tap vport2
Utils.Run Command On Mininet ${TOOLS_SYSTEM_IP} ifconfig vport1 up
Add Sample Tap Device To The Manual Bridge And Verify
[Arguments] ${controller_index_list} ${SYSTEM_IP}=${TOOLS_SYSTEM_IP}
- [Documentation] Add Tap Device vport1 and vport2 to br-s1 using OVS command and verify it gets added in all instances in ${controller_index_list}.
+ [Documentation] Add Tap Device vport1 and vport2 to br-s1 using OVS command and verify it gets added in all instances in ${controller_index_list}.
Utils.Run Command On Mininet ${SYSTEM_IP} sudo ovs-vsctl add-port br-s1 vport1 -- add-port br-s1 vport2
${dictionary_operational}= Create Dictionary vport1=2 vport2=2
${dictionary_config}= Create Dictionary vport1=0 vport2=0
[Arguments] ${folder} ${mapping_as_string}
[Documentation] Read URI template from folder, strip endline, make changes according to mapping, return the result.
${status} ${uri_template}= BuiltIn.Run_Keyword_And_Ignore_Error OperatingSystem.Get_File ${folder}${/}config.uri.${ODL_STREAM}
- ${uri_template}= BuiltIn.Run Keyword If '${status}' != 'PASS' OperatingSystem.Get_File ${folder}${/}config.uri ELSE BuiltIn.Set Variable ${uri_template}
+ ${uri_template}= BuiltIn.Run Keyword If '${status}' != 'PASS' OperatingSystem.Get_File ${folder}${/}config.uri
+ ... ELSE BuiltIn.Set Variable ${uri_template}
BuiltIn.Log ${uri_template}
${uri_part}= Strip_Endline_And_Apply_Substitutions_From_Mapping ${uri_template} ${mapping_as_string}
[Return] ${uri_part}
[Arguments] ${folder} ${mapping_as_string}
[Documentation] Read XML data template from folder, strip endline, make changes according to mapping, return the result.
${status} ${data_template}= BuiltIn.Run_Keyword_And_Ignore_Error OperatingSystem.Get_File ${folder}${/}data.xml.${ODL_STREAM}
- ${data_template}= BuiltIn.Run Keyword If '${status}' != 'PASS' OperatingSystem.Get_File ${folder}${/}data.xml ELSE BuiltIn.Set Variable ${data_template}
+ ${data_template}= BuiltIn.Run Keyword If '${status}' != 'PASS' OperatingSystem.Get_File ${folder}${/}data.xml
+ ... ELSE BuiltIn.Set Variable ${data_template}
BuiltIn.Log ${data_template}
${xml_data}= Strip_Endline_And_Apply_Substitutions_From_Mapping ${data_template} ${mapping_as_string}
[Return] ${xml_data}
[Arguments] ${folder} ${mapping_as_string}
[Documentation] Read JSON data template from folder, strip endline, make changes according to mapping, return the result.
${status} ${data_template}= BuiltIn.Run_Keyword_And_Ignore_Error OperatingSystem.Get_File ${folder}${/}data.json.${ODL_STREAM}
- ${data_template}= BuiltIn.Run Keyword If '${status}' != 'PASS' OperatingSystem.Get_File ${folder}${/}data.json ELSE BuiltIn.Set Variable ${data_template}
+ ${data_template}= BuiltIn.Run Keyword If '${status}' != 'PASS' OperatingSystem.Get_File ${folder}${/}data.json
+ ... ELSE BuiltIn.Set Variable ${data_template}
BuiltIn.Log ${data_template}
${json_data}= Strip_Endline_And_Apply_Substitutions_From_Mapping ${data_template} ${mapping_as_string}
[Return] ${json_data}
Execute Curl
[Arguments] ${docker_name} ${dest_address} ${service_port} ${endless}="FALSE" ${sleep}=1
[Documentation] Executes curl or curl loop for caller methods based on given parameters.
- Run Keyword If ${endless} == "TRUE" Run Keywords
- ... SSHLibrary.Execute Command docker exec -d ${docker_name} /bin/sh -c "while [ -f curl_running ]; do curl ${dest_address}:${service_port} -m 1 && sleep ${sleep}; done"
+ Run Keyword If ${endless} == "TRUE" Run Keywords SSHLibrary.Execute Command docker exec -d ${docker_name} /bin/sh -c "while [ -f curl_running ]; do curl ${dest_address}:${service_port} -m 1 && sleep ${sleep}; done"
... AND Return From Keyword
${output} SSHLibrary.Execute Command docker exec ${docker_name} curl ${dest_address}:${service_port} -m 5 >/dev/null 2>&1 && echo success
Should Contain ${output} success
Write log:tail
Read Until ${message}
Close Connection
-
Set Suite Variable ${mininet_conn_id}
Utils.Flexible Mininet Login
SSHLibrary.Write java -cp /tmp/agent/simple-agent/src/main/java/ org.opendaylight.ocpplugin.OcpAgent ${controller} 1033 ${vendorID} ${serialNumber}
- SSHLibrary.Read Until getParamResp
+ SSHLibrary.Read Until getParamResp
[Return] ${mininet_conn_id}
Start Emulator Multiple
Utils.Flexible Mininet Login
: FOR ${NODE_NUM} IN RANGE 1 ${number}
\ SSHLibrary.Write java -cp /tmp/agent/simple-agent/src/main/java/ org.opendaylight.ocpplugin.OcpAgent ${controller} 1033 ${vendorID} ${NODE_NUM} &
- \ SSHLibrary.Read Until getParamResp
+ \ SSHLibrary.Read Until getParamResp
[Return] ${mininet_conn_id}
Stop Emulator And Exit
Create Network
[Arguments] ${network_name} ${additional_args}=${EMPTY}
[Documentation] Create Network with neutron request.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron -v net-create ${network_name} ${additional_args} 30s
Close Connection
List Networks
[Documentation] List networks and return output with neutron client.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron net-list 30s
Close Connection
List Subnets
[Documentation] List subnets and return output with neutron client.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron subnet-list 30s
Close Connection
Delete Network
[Arguments] ${network_name}
[Documentation] Delete Network with neutron request.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt neutron -v net-delete ${network_name} 30s
+ ${output}= Write Commands Until Prompt neutron -v net-delete ${network_name} 30s
Close Connection
Log ${output}
Should Contain ${output} Deleted network: ${network_name}
Create SubNet
[Arguments] ${network_name} ${subnet} ${range_ip}
[Documentation] Create SubNet for the Network with neutron request.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron -v subnet-create ${network_name} ${range_ip} --name ${subnet} 30s
Close Connection
Create Port
[Arguments] ${network_name} ${port_name}
[Documentation] Create Port with neutron request.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron -v port-create ${network_name} --name ${port_name} 30s
Close Connection
[Arguments] ${subnet}
[Documentation] Delete SubNet for the Network with neutron request.
Log ${subnet}
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron -v subnet-delete ${subnet}
Close Connection
Delete Vm Instance
[Arguments] ${vm_name}
[Documentation] Delete Vm instances using instance names.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt nova force-delete ${vm_name} 40s
+ ${output}= Write Commands Until Prompt nova force-delete ${vm_name} 40s
Close Connection
Get Net Id
- [Arguments] ${network_name} ${devstack_conn_id}
+ [Arguments] ${network_name} ${devstack_conn_id}
[Documentation] Retrieve the net id for the given network name to create specific vm instance
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt neutron net-list | grep "${network_name}" | get_field 1 30s
+ ${output}= Write Commands Until Prompt neutron net-list | grep "${network_name}" | get_field 1 30s
Log ${output}
${splitted_output}= Split String ${output} ${EMPTY}
${net_id}= Get from List ${splitted_output} 0
Create Vm Instances
[Arguments] ${net_name} ${vm_instance_names} ${image}=cirros-0.3.4-x86_64-uec ${flavor}=m1.nano
[Documentation] Create X Vm Instance with the net id of the Netowrk.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
+ ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
: FOR ${VmElement} IN @{vm_instance_names}
\ ${output}= Write Commands Until Prompt nova boot --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${VmElement} 30s
\ Log ${output}
Verify VM Is ACTIVE
[Arguments] ${vm_name}
[Documentation] Run these commands to check whether the created vm instance is active or not.
- ${output}= Write Commands Until Prompt nova show ${vm_name} | grep OS-EXT-STS:vm_state 30s
+ ${output}= Write Commands Until Prompt nova show ${vm_name} | grep OS-EXT-STS:vm_state 30s
Log ${output}
Should Contain ${output} active
[Arguments] ${net_name} ${vm_ip}
[Documentation] Reach all Vm Instance with the net id of the Netowrk.
Log ${vm_ip}
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
+ ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
Log ${net_id}
${output}= Write Commands Until Prompt sudo ip netns exec qdhcp-${net_id} ping -c 3 ${vm_ip} 20s
Log ${output}
[Arguments] ${net_name} ${vm_ip}
[Documentation] Should Not Reach Vm Instance with the net id of the Netowrk.
Log ${vm_ip}
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
+ ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
Log ${net_id}
${output}= Write Commands Until Prompt sudo ip netns exec qdhcp-${net_id} ping -c 3 ${vm_ip} 20s
Close Connection
[Arguments] ${net_name} ${src_ip} ${list_of_local_dst_ips} ${l2_or_l3}=l2 ${list_of_external_dst_ips}=${NONE} ${user}=cirros
... ${password}=cubswin:)
[Documentation] Login to the vm instance using ssh in the network.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
+ ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
${output}= Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ssh ${user}@${src_ip} -o ConnectTimeout=10 -o StrictHostKeyChecking=no d:
Log ${output}
${output}= Write Commands Until Expected Prompt ${password} ${OS_SYSTEM_PROMPT}
Create Router
[Arguments] ${router_name}
[Documentation] Create Router and Add Interface to the subnets.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron -v router-create ${router_name} 30s
Close Connection
Add Router Interface
[Arguments] ${router_name} ${interface_name}
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron -v router-interface-add ${router_name} ${interface_name}
Close Connection
Remove Interface
[Arguments] ${router_name} ${interface_name}
[Documentation] Remove Interface to the subnets.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron -v router-interface-delete ${router_name} ${interface_name}
Close Connection
Delete Router
[Arguments] ${router_name}
[Documentation] Delete Router and Interface to the subnets.
- ${devstack_conn_id}= Get ControlNode Connection
+ ${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt neutron -v router-delete ${router_name} 60s
+ ${output}= Write Commands Until Prompt neutron -v router-delete ${router_name} 60s
Close Connection
Should Contain ${output} Deleted router:
${control_conn_id}= SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT}
Utils.Flexible SSH Login ${OS_USER} ${DEVSTACK_SYSTEM_PASSWORD}
SSHLibrary.Set Client Configuration timeout=30s
- Source Password force=yes
+ Source Password force=yes
[Return] ${control_conn_id}
Get OvsDebugInfo
${output}= Write Commands Until Prompt sudo ip netns list
Log ${output}
: FOR ${index} IN @{vm_indices}
- \ ${output}= Write Commands Until Prompt nova show ${index} 30s
+ \ ${output}= Write Commands Until Prompt nova show ${index} 30s
\ Log ${output}
Close Connection
[Return] ${resp}
Send Basic Delete Request
- [Documentation] Sends a HTTP/DELETE request to a given URL
[Arguments] ${url}
+ [Documentation] Sends a HTTP/DELETE request to a given URL
${resp} Delete Request session ${CONFIG_API}/${url}
Log Deleting ${CONFIG_API}/${url}
[Return] ${resp}
Delete Underlay Node
- [Documentation] Deletes a node from an underlay topology
[Arguments] ${topology-id} ${node-id}
+ [Documentation] Deletes a node from an underlay topology
${resp} Send Basic Delete Request network-topology:network-topology/topology/${topology-id}/node/${node-id}
[Return] ${resp}
*** Settings ***
Documentation Creates/closes SSH connections to all GBP nodes. Existing connections
-... can be identified by aliases.
+... can be identified by aliases.
Library SSHLibrary
Resource ../../../../libraries/Utils.robot
Resource Variables.robot
Switch Connection GBP2_CONNECTION
SSHLibrary.Close Connection
Switch Connection GBP3_CONNECTION
- SSHLibrary.Close Connection
\ No newline at end of file
+ SSHLibrary.Close Connection
*** Testcases ***
Show GBPSFC1 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
Start Connections
- Switch Connection GBP1_CONNECTION
- Show Switch Status sw1
+ Switch Connection GBP1_CONNECTION
+ Show Switch Status sw1
Show GBPSFC2 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GBP2_CONNECTION
- Show Switch Status sw2
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GBP2_CONNECTION
+ Show Switch Status sw2
Show GBPSFC3 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GBP3_CONNECTION
- Show Switch Status sw3
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GBP3_CONNECTION
+ Show Switch Status sw3
Close Connections
Read Tenants Confing From ODL
*** Testcases ***
Show GBPSFC1 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
Start Connections
- Switch Connection GBP1_CONNECTION
- Show Switch Status sw1
+ Switch Connection GBP1_CONNECTION
+ Show Switch Status sw1
Show GBPSFC2 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GBP2_CONNECTION
- Show Switch Status sw2
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GBP2_CONNECTION
+ Show Switch Status sw2
Show GBPSFC3 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GBP3_CONNECTION
- Show Switch Status sw3
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GBP3_CONNECTION
+ Show Switch Status sw3
Close Connections
Read Tenants Confing From ODL
*** Testcases ***
Show GBPSFC1 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
Start Connections
- Switch Connection GPSFC1_CONNECTION
- Show Switch Status sw1
+ Switch Connection GPSFC1_CONNECTION
+ Show Switch Status sw1
Show GBPSFC2 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC2_CONNECTION
- Show Switch Status sw2
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC2_CONNECTION
+ Show Switch Status sw2
Show GBPSFC3 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC3_CONNECTION
- Show Switch Status sw3
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC3_CONNECTION
+ Show Switch Status sw3
Show GBPSFC4 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC4_CONNECTION
- Show Switch Status sw4
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC4_CONNECTION
+ Show Switch Status sw4
+
Show GBPSFC5 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC5_CONNECTION
- Show Switch Status sw5
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC5_CONNECTION
+ Show Switch Status sw5
Show GBPSFC6 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC6_CONNECTION
- Show Switch Status sw6
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC6_CONNECTION
+ Show Switch Status sw6
Close Connections
Read Tenants Confing From ODL
*** Testcases ***
Show GBPSFC1 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
Start Connections
- Switch Connection GPSFC1_CONNECTION
- Show Switch Status sw1
+ Switch Connection GPSFC1_CONNECTION
+ Show Switch Status sw1
Show GBPSFC2 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC2_CONNECTION
- Show Switch Status sw2
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC2_CONNECTION
+ Show Switch Status sw2
Show GBPSFC3 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC3_CONNECTION
- Show Switch Status sw3
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC3_CONNECTION
+ Show Switch Status sw3
Show GBPSFC4 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC4_CONNECTION
- Show Switch Status sw4
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC4_CONNECTION
+ Show Switch Status sw4
+
Show GBPSFC5 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC5_CONNECTION
- Show Switch Status sw5
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC5_CONNECTION
+ Show Switch Status sw5
Show GBPSFC6 Status
- [Documentation] Shows flows and configuration of a switch for easier debugging.
- Switch Connection GPSFC6_CONNECTION
- Show Switch Status sw6
+ [Documentation] Shows flows and configuration of a switch for easier debugging.
+ Switch Connection GPSFC6_CONNECTION
+ Show Switch Status sw6
Close Connections
Read Tenants Confing From ODL
*** Variables ***
${NODE_AMOUNT} 20
+
*** Test Cases ***
Install agent
[Documentation] install agent
[Documentation] get inventory node
[Tags] get node
${NODE_AMOUNT}= Convert To Integer ${NODE_AMOUNT}
- ${mininet_conn_id}= OcpAgentKeywords.Start Emulator Multiple number=${NODE_AMOUNT+1}
- ${resp} Get Request session ${NODE_ID}TST-${NODE_AMOUNT}
+ ${mininet_conn_id}= OcpAgentKeywords.Start Emulator Multiple number=${NODE_AMOUNT+1}
+ ${resp} Get Request session ${NODE_ID}TST-${NODE_AMOUNT}
Should Be Equal As Strings ${resp.status_code} 200
Get param from emulators
- [Documentation] OCPPLUGIN get param
+ [Documentation] OCPPLUGIN get param
[Tags] OCPPLUGIN get
${NODE_AMOUNT}= Convert To Integer ${NODE_AMOUNT}
: FOR ${NODE_NUM} IN RANGE 1 ${NODE_AMOUNT+1}
\ ${resp} Post Request session ${REST_GET_PARAM} data={"input":{"nodeId":"ocp:TST-${NODE_NUM}","objId":"ALL","paramName":"ALL"}}
\ Should Be Equal As Strings ${resp.status_code} 200
- Stop Emulator And Exit ${mininet_conn_id}
\ No newline at end of file
+ Stop Emulator And Exit ${mininet_conn_id}
*** Settings ***
-Documentation Initial test case to setup vxlan tunnels as required for netvirt-vpnservice. It is assumed
-... that the test environment is already deployed and ready.
+Documentation Initial test case to setup vxlan tunnels as required for netvirt-vpnservice. It is assumed
+... that the test environment is already deployed and ready.
Library SSHLibrary
Library RequestsLibrary
Resource ../../libraries/KarafKeywords.robot
Variables ../../../variables/Variables.py
*** Variables ***
-${OSTENANTNAME} "admin"
+${OSTENANTNAME} "admin"
${OSUSERNAME} "admin"
${OSPASSWORD} "admin"
${UserInfo} {"auth": {"tenantName": ${OSTENANTNAME}, "passwordCredentials": {"username": ${OSUSERNAME}, "password": ${OSPASSWORD}}}}
*** Settings ***
-Documentation Test suite for running tempest tests. It is assumed that the test environment
+Documentation Test suite for running tempest tests. It is assumed that the test environment
... is already deployed and ready.
Suite Setup Log In To Tempest Executor And Setup Test Environment
Suite Teardown Close All Connections
*** Keywords ***
Log In To Tempest Executor And Setup Test Environment
[Documentation] Open SSH connection to a devstack system and source the openstack
- ... credentials needed to run the tempest tests
- # source_pwd is expected to exist in the below Create Network, Create Subnet keywords. Might be a bug.
+ ... credentials needed to run the tempest tests
+ # source_pwd is expected to exist in the below Create Network, Create Subnet keywords. Might be a bug.
${source_pwd} Set Variable yes
Set Suite Variable ${source_pwd}
# Tempest network.api tests need an existing external network in order to create
- # routers against. Creating that here.
+ # routers against. Creating that here.
Create Network external --router:external=True
- Create Subnet external external-subnet 10.0.0.0/24
+ Create Subnet external external-subnet 10.0.0.0/24
List Networks
- ${control_node_conn_id}= SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT}
+ ${control_node_conn_id}= SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT}
Utils.Flexible SSH Login ${OS_USER}
Write Commands Until Prompt source ${DEVSTACK_DEPLOY_PATH}/openrc admin admin
- ${net_id}= Get Net Id external ${control_node_conn_id}
+ ${net_id}= Get Net Id external ${control_node_conn_id}
Generate Tempest Conf File ${net_id}
-
Generate Tempest Conf File
[Arguments] ${external_network_id}
- [Documentation] Tempest will be run with a config file ./tempest.conf. That file needs to be auto
+ [Documentation] Tempest will be run with a config file ./tempest.conf. That file needs to be auto
... generated first, then updated with the current openstack info, including the specific external
- ... network id. There was trouble with permissions in upstream CI, so everything is done with sudo
+ ... network id. There was trouble with permissions in upstream CI, so everything is done with sudo
... and even the tempest.conf is changed to 777 permissions.
Write Commands Until Prompt source ${DEVSTACK_DEPLOY_PATH}/openrc admin admin
Write Commands Until Prompt cd /opt/stack/tempest
Variables ../../../variables/Variables.py
*** Variables ***
-${net_1} NET10
-${net_2} NET20
-${subnet_1} SUBNET1
-${subnet_2} SUBNET2
+${net_1} NET10
+${net_2} NET20
+${subnet_1} SUBNET1
+${subnet_2} SUBNET2
${subnet_1_cidr} 10.1.1.0/24
${subnet_2_cidr} 20.1.1.0/24
-${port_1} PORT1
-${port_2} PORT2
-${port_3} PORT3
-${port_4} PORT4
+${port_1} PORT1
+${port_2} PORT2
+${port_3} PORT3
+${port_4} PORT4
*** Test Cases ***
Verify Tunnel Creation
[Documentation] Checks that vxlan tunnels have been created properly.
[Tags] exclude
- Log This test case is currently a noop, but work can be added here to validate if needed. However, as the
- ... suite Documentation notes, it's already assumed that the environment has been configured properly. If
- ... we do add work in this test case, we need to remove the "exclude" tag for it to run. In fact, if this
- ... test case is critical to run, and if it fails we would be dead in the water for the rest of the suite,
- ... we should move it to Suite Setup so that nothing else will run and waste time in a broken environment.
+ Log This test case is currently a noop, but work can be added here to validate if needed. However, as the suite Documentation notes, it's already assumed that the environment has been configured properly. If we do add work in this test case, we need to remove the "exclude" tag for it to run. In fact, if this
+ ... test case is critical to run, and if it fails we would be dead in the water for the rest of the suite, we should move it to Suite Setup so that nothing else will run and waste time in a broken environment.
+ #TC1
-#TC1
Create Neutron Networks
[Documentation] Create two networks
Create Network ${net_1} --provider:network_type local
*** Settings ***
Documentation Test suite to test connectivity problems
-Suite Setup Setup SXP Environment 6
-Suite Teardown Clean SXP Environment 6
+Suite Setup Setup SXP Environment 6
+Suite Teardown Clean SXP Environment 6
Test Setup Clean Nodes
Library RequestsLibrary
Library SSHLibrary
*** Settings ***
Documentation Test suite to test custom password per peer fuctionality
Suite Setup Setup SXP Environment Local
-Suite Teardown Clean SXP Environment 4
+Suite Teardown Clean SXP Environment 4
Test Setup Clean Nodes
Library RequestsLibrary
Library SSHLibrary
*** Settings ***
Documentation Test suite to verify Inbound filtering functionality
-Suite Setup Setup SXP Environment 6
-Suite Teardown Clean SXP Environment 6
+Suite Setup Setup SXP Environment 6
+Suite Teardown Clean SXP Environment 6
Test Teardown Clean Nodes
Library RequestsLibrary
Library SSHLibrary
*** Settings ***
Documentation Test suite to verify Outbound filtering functionality
-Suite Setup Setup SXP Environment 6
-Suite Teardown Clean SXP Environment 6
+Suite Setup Setup SXP Environment 6
+Suite Teardown Clean SXP Environment 6
Test Teardown Clean Nodes
Library RequestsLibrary
Library SSHLibrary
*** Settings ***
Documentation Test suite to verify inbound-discarding filtering functionality
-Suite Setup Setup SXP Environment 6
-Suite Teardown Clean SXP Environment 6
+Suite Setup Setup SXP Environment 6
+Suite Teardown Clean SXP Environment 6
Test Teardown Clean Nodes
Library RequestsLibrary
Library SSHLibrary
*** Settings ***
Documentation Test suite to verify PeerSequence filtering functionality
-Suite Setup Setup SXP Environment 6
-Suite Teardown Clean SXP Environment 6
+Suite Setup Setup SXP Environment 6
+Suite Teardown Clean SXP Environment 6
Test Teardown Clean Nodes
Library RequestsLibrary
Library SSHLibrary
*** Settings ***
Documentation Test suite to verify Behaviour in different topologies
-Suite Setup Setup SXP Environment 6
-Suite Teardown Clean SXP Environment 6
+Suite Setup Setup SXP Environment 6
+Suite Teardown Clean SXP Environment 6
Test Teardown Clean Nodes
Library RequestsLibrary
Library SSHLibrary
*** Settings ***
Documentation Test suite to test scalability of SXP
-Suite Setup Setup SXP Environment 32
-Suite Teardown Clean SXP Environment 32
+Suite Setup Setup SXP Environment 32
+Suite Teardown Clean SXP Environment 32
Test Setup Clean Nodes
Library RequestsLibrary
Library SSHLibrary
: FOR ${INDEX} IN RANGE 0 ${DURATION+1} ${STEP}
\ ${session} Get Connection ${ODL_SYSTEM_IP} ${ELASTICPORT}
\ Log ${session}
- \ ${threading}= Get Jvm Threading ${session}
+ \ ${threading}= Get Jvm Threading ${session}
\ Log ${threading}
- \ ${memory}= Get Jvm Memory ${session}
+ \ ${memory}= Get Jvm Memory ${session}
\ Log ${memory}
- \ ${classload}= Get Jvm Classloading ${session}
+ \ ${classload}= Get Jvm Classloading ${session}
\ Log ${classload}
- \ ${operatingsystem}= Get Jvm operatingsystem ${session}
+ \ ${operatingsystem}= Get Jvm operatingsystem ${session}
\ Log ${operatingsystem}
\ Sleep ${STEP}
Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 8
#Remove an underlay aggregated node, preserving the overlay node
Delete Underlay Node network-topo:1 bgp:3
- ${resp} Wait Until Keyword Succeeds 10x 250ms Basic Request Get And Test ${OVERLAY_TOPO_URL} <supporting-node> 9
+ ${resp} Wait Until Keyword Succeeds 10x 250ms Basic Request Get And Test ${OVERLAY_TOPO_URL} <supporting-node>
+ ... 9
Check Aggregated Node in Topology ${model} ${resp.content} 2 bgp:4
#Remove an underlay aggregated node, expecting removal of the overlay node
Delete Underlay Node network-topo:1 bgp:4
Send Basic Request And Test If Contain X Times ${request} ${OVERLAY_TOPO_URL} <node-id>node: 7
#Remove an underlay aggregated node, preserving the overlay node
Delete Underlay Node openflow-topo:2 of-node:6
- ${resp} Wait Until Keyword Succeeds 10x 250ms Basic Request Get And Test ${OVERLAY_TOPO_URL} <supporting-node> 9
+ ${resp} Wait Until Keyword Succeeds 10x 250ms Basic Request Get And Test ${OVERLAY_TOPO_URL} <supporting-node>
+ ... 9
Check Aggregated Node in Topology ${model} ${resp.content} 2 of-node:1
#Remove an underlay aggregated node, expecting removal of the overlay node
Delete Underlay Node openflow-topo:1 of-node:1