Change-Id: I07097ebe328c8823b841448ed3f25fa80ffcfd3e
Signed-off-by: Sam Hague <shague@redhat.com>
SSHLibrary.Write ${cmd};echo Command Returns $?
${output}= SSHLibrary.Read Until Prompt
[Return] ${output}
SSHLibrary.Write ${cmd};echo Command Returns $?
${output}= SSHLibrary.Read Until Prompt
[Return] ${output}
+
+Write Commands Until Prompt And Log
+ [Arguments] ${cmd} ${timeout}=${default_devstack_prompt_timeout}
+ [Documentation] quick wrapper for Write and Read Until Prompt Keywords to make test cases more readable
+ ${output} = Write Commands Until Prompt ${cmd} ${timeout}
+ Log ${output}
+ [Return] ${output}
Get Tenant ID From Security Group
[Documentation] Returns tenant ID by reading it from existing default security-group.
${rc} ${output}= Run And Return Rc And Output openstack security group show default | grep "| tenant_id" | awk '{print $4}'
Get Tenant ID From Security Group
[Documentation] Returns tenant ID by reading it from existing default security-group.
${rc} ${output}= Run And Return Rc And Output openstack security group show default | grep "| tenant_id" | awk '{print $4}'
Should Not Be True ${rc}
[Return] ${output}
Should Not Be True ${rc}
[Return] ${output}
Verify Gateway Ips
[Documentation] Verifies the Gateway Ips with dump flow.
Verify Gateway Ips
[Documentation] Verifies the Gateway Ips with dump flow.
- ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
: FOR ${GatewayIpElement} IN @{GATEWAY_IPS}
\ Should Contain ${output} ${GatewayIpElement}
Verify Dhcp Ips
[Documentation] Verifies the Dhcp Ips with dump flow.
: FOR ${GatewayIpElement} IN @{GATEWAY_IPS}
\ Should Contain ${output} ${GatewayIpElement}
Verify Dhcp Ips
[Documentation] Verifies the Dhcp Ips with dump flow.
- ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
: FOR ${DhcpIpElement} IN @{DHCP_IPS}
\ Should Contain ${output} ${DhcpIpElement}
Verify No Dhcp Ips
[Documentation] Verifies the Dhcp Ips with dump flow.
: FOR ${DhcpIpElement} IN @{DHCP_IPS}
\ Should Contain ${output} ${DhcpIpElement}
Verify No Dhcp Ips
[Documentation] Verifies the Dhcp Ips with dump flow.
- ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
: FOR ${DhcpIpElement} IN @{DHCP_IPS}
\ Should Not Contain ${output} ${DhcpIpElement}
: FOR ${DhcpIpElement} IN @{DHCP_IPS}
\ Should Not Contain ${output} ${DhcpIpElement}
[Documentation] Delete SubNet for the Network with neutron request.
Log ${subnet}
${rc} ${output}= Run And Return Rc And Output openstack subnet delete ${subnet}
[Documentation] Delete SubNet for the Network with neutron request.
Log ${subnet}
${rc} ${output}= Run And Return Rc And Output openstack subnet delete ${subnet}
Should Not Be True ${rc}
Verify No Gateway Ips
[Documentation] Verifies the Gateway Ips removed with dump flow.
Should Not Be True ${rc}
Verify No Gateway Ips
[Documentation] Verifies the Gateway Ips removed with dump flow.
- ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
: FOR ${GatewayIpElement} IN @{GATEWAY_IPS}
\ Should Not Contain ${output} ${GatewayIpElement}
: FOR ${GatewayIpElement} IN @{GATEWAY_IPS}
\ Should Not Contain ${output} ${GatewayIpElement}
[Documentation] Delete Vm instances using instance names.
${rc} ${output}= Run And Return Rc And Output openstack server delete ${vm_name}
Log ${output}
[Documentation] Delete Vm instances using instance names.
${rc} ${output}= Run And Return Rc And Output openstack server delete ${vm_name}
Log ${output}
Get Net Id
[Arguments] ${network_name} ${devstack_conn_id}
[Documentation] Retrieve the net id for the given network name to create specific vm instance
${rc} ${output}= Run And Return Rc And Output openstack network list | grep "${network_name}" | awk '{print $2}'
Get Net Id
[Arguments] ${network_name} ${devstack_conn_id}
[Documentation] Retrieve the net id for the given network name to create specific vm instance
${rc} ${output}= Run And Return Rc And Output openstack network list | grep "${network_name}" | awk '{print $2}'
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${net_id}= Get from List ${splitted_output} 0
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${net_id}= Get from List ${splitted_output} 0
[Return] ${net_id}
Get Subnet Id
[Arguments] ${subnet_name} ${devstack_conn_id}
[Documentation] Retrieve the subnet id for the given subnet name
${rc} ${output}= Run And Return Rc And Output openstack subnet show "${subnet_name}" | grep " id " | awk '{print $4}'
[Return] ${net_id}
Get Subnet Id
[Arguments] ${subnet_name} ${devstack_conn_id}
[Documentation] Retrieve the subnet id for the given subnet name
${rc} ${output}= Run And Return Rc And Output openstack subnet show "${subnet_name}" | grep " id " | awk '{print $4}'
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${subnet_id}= Get from List ${splitted_output} 0
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${subnet_id}= Get from List ${splitted_output} 0
[Return] ${subnet_id}
Get Port Id
[Arguments] ${port_name} ${devstack_conn_id}
[Documentation] Retrieve the port id for the given port name to attach specific vm instance to a particular port
${rc} ${output}= Run And Return Rc And Output openstack port list | grep "${port_name}" | awk '{print $2}'
[Return] ${subnet_id}
Get Port Id
[Arguments] ${port_name} ${devstack_conn_id}
[Documentation] Retrieve the port id for the given port name to attach specific vm instance to a particular port
${rc} ${output}= Run And Return Rc And Output openstack port list | grep "${port_name}" | awk '{print $2}'
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${port_id}= Get from List ${splitted_output} 0
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${port_id}= Get from List ${splitted_output} 0
[Return] ${port_id}
Get Router Id
[Arguments] ${router1} ${devstack_conn_id}
[Documentation] Retrieve the router id for the given router name
${rc} ${output}= Run And Return Rc And Output openstack router list -f table | grep "${router1}" | awk '{print $2}'
[Return] ${port_id}
Get Router Id
[Arguments] ${router1} ${devstack_conn_id}
[Documentation] Retrieve the router id for the given router name
${rc} ${output}= Run And Return Rc And Output openstack router list -f table | grep "${router1}" | awk '{print $2}'
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${router_id}= Get from List ${splitted_output} 0
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${router_id}= Get from List ${splitted_output} 0
[Return] ${router_id}
Create Vm Instances
[Return] ${router_id}
Create Vm Instances
[Arguments] ${vm_name}
[Documentation] Run these commands to check whether the created vm instance is active or not.
${rc} ${output}= Run And Return Rc And Output openstack server show ${vm_name} | grep OS-EXT-STS:vm_state
[Arguments] ${vm_name}
[Documentation] Run these commands to check whether the created vm instance is active or not.
${rc} ${output}= Run And Return Rc And Output openstack server show ${vm_name} | grep OS-EXT-STS:vm_state
Should Not Be True ${rc}
Should Contain ${output} active
Should Not Be True ${rc}
Should Contain ${output} active
Switch Connection ${devstack_conn_id}
${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
Log ${net_id}
Switch Connection ${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}
+ ${output}= Write Commands Until Prompt And Log sudo ip netns exec qdhcp-${net_id} ping -c 3 ${vm_ip} 20s
Close Connection
Should Contain ${output} 64 bytes
Close Connection
Should Contain ${output} 64 bytes
Log ${vm_floating_ip}
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
Log ${vm_floating_ip}
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt ping ${additional_args} -c 3 ${vm_floating_ip} 20s
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log ping ${additional_args} -c 3 ${vm_floating_ip} 20s
Close Connection
Should Contain ${output} 64 bytes
Close Connection
Should Contain ${output} 64 bytes
Close Vm Instance
[Documentation] Exit the vm instance.
Close Vm Instance
[Documentation] Exit the vm instance.
- ${output}= Write Commands Until Prompt exit
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log exit
Check If Console Is VmInstance
[Arguments] ${console}=cirros
Check If Console Is VmInstance
[Arguments] ${console}=cirros
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
Log ${vm_ip}
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
Log ${vm_ip}
- ${output}= Write Commands Until Prompt ( ( echo "${server_data}" | sudo timeout 60 nc -l ${additional_args} ${port} ) & )
- Log ${output}
- ${output}= Write Commands Until Prompt sudo netstat -nlap | grep ${port}
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log ( ( echo "${server_data}" | sudo timeout 60 nc -l ${additional_args} ${port} ) & )
+ ${output}= Write Commands Until Prompt And Log sudo netstat -nlap | grep ${port}
${nc_output}= Execute Command on VM Instance ${net_name} ${vm_ip} sudo echo "${client_data}" | nc -v -w 5 ${additional_args} ${dest_ip} ${port}
Log ${nc_output}
${output}= Execute Command on VM Instance ${net_name} ${vm_ip} sudo route -n
${nc_output}= Execute Command on VM Instance ${net_name} ${vm_ip} sudo echo "${client_data}" | nc -v -w 5 ${additional_args} ${dest_ip} ${port}
Log ${nc_output}
${output}= Execute Command on VM Instance ${net_name} ${vm_ip} sudo route -n
[Arguments] ${router_name}
[Documentation] List Router interface associated with given Router and return output with neutron client.
${rc} ${output}= Run And Return Rc And Output openstack port list --router ${router_name} -f value
[Arguments] ${router_name}
[Documentation] List Router interface associated with given Router and return output with neutron client.
${rc} ${output}= Run And Return Rc And Output openstack port list --router ${router_name} -f value
Should Not Be True ${rc}
[Return] ${output}
Should Not Be True ${rc}
[Return] ${output}
[Documentation] Run these commands for debugging, it can list state of VM instances and ip information in control node
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
[Documentation] Run these commands for debugging, it can list state of VM instances and ip information in control node
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt sudo ip netns list
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log sudo ip netns list
Close Connection
: FOR ${index} IN @{vm_indices}
\ ${rc} ${output}= Run And Return Rc And Output nova show ${index}
\ Log ${output}
Close Connection
: FOR ${index} IN @{vm_indices}
\ ${rc} ${output}= Run And Return Rc And Output nova show ${index}
\ Log ${output}
List Nova VMs
List Networks
List Subnets
List Nova VMs
List Networks
List Subnets
Neutron Security Group Show
[Arguments] ${SecurityGroupRuleName}
[Documentation] Displays the neutron security group configurations that belongs to a given neutron security group name
Neutron Security Group Show
[Arguments] ${SecurityGroupRuleName}
[Documentation] Displays the neutron security group configurations that belongs to a given neutron security group name
- ${cmd}= Set Variable openstack security group show ${SecurityGroupRuleName}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output openstack security group show ${SecurityGroupRuleName}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Neutron Port Show
[Arguments] ${PortName}
[Documentation] Display the port configuration that belong to a given neutron port
Neutron Port Show
[Arguments] ${PortName}
[Documentation] Display the port configuration that belong to a given neutron port
- ${cmd}= Set Variable openstack port show ${PortName}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output openstack port show ${PortName}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
[Documentation] Create a security group with specified name ,description & protocol value according to security group template
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
[Documentation] Create a security group with specified name ,description & protocol value according to security group template
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${cmd}= Set Variable openstack security group create ${SecurityGroupName} ${additional_args}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output openstack security group create ${SecurityGroupName} ${additional_args}
Log ${output}
Should Not Be True ${rc}
${sgp_id}= Should Match Regexp ${output} [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Log ${output}
Should Not Be True ${rc}
${sgp_id}= Should Match Regexp ${output} [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Neutron Security Group Update
[Arguments] ${SecurityGroupName} ${additional_args}=${EMPTY}
[Documentation] Updating security groups
Neutron Security Group Update
[Arguments] ${SecurityGroupName} ${additional_args}=${EMPTY}
[Documentation] Updating security groups
- ${cmd}= Set Variable openstack security group set ${SecurityGroupName} ${additional_args}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output openstack security group set ${SecurityGroupName} ${additional_args}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Create Neutron Port With Additional Params
[Arguments] ${network_name} ${port_name} ${additional_args}=${EMPTY}
[Documentation] Create Port With given additional parameters
Create Neutron Port With Additional Params
[Arguments] ${network_name} ${port_name} ${additional_args}=${EMPTY}
[Documentation] Create Port With given additional parameters
- ${cmd}= Set Variable neutron -v port-create ${network_name} --name ${port_name} ${additional_args}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output neutron -v port-create ${network_name} --name ${port_name} ${additional_args}
Log ${output}
Should Not Be True ${rc}
${port_id}= Should Match Regexp ${OUTPUT} [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
Log ${output}
Should Not Be True ${rc}
${port_id}= Should Match Regexp ${OUTPUT} [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
[Arguments] ${port_name}
[Documentation] Keyword would return the IP of the ${port_name} received.
${rc} ${output}= Run And Return Rc And Output openstack port list | grep "${port_name}" | awk -F\\' '{print $2}'
[Arguments] ${port_name}
[Documentation] Keyword would return the IP of the ${port_name} received.
${rc} ${output}= Run And Return Rc And Output openstack port list | grep "${port_name}" | awk -F\\' '{print $2}'
${splitted_output}= Split String ${output} ${EMPTY}
${port_ip}= Get from List ${splitted_output} 0
${splitted_output}= Split String ${output} ${EMPTY}
${port_ip}= Get from List ${splitted_output} 0
Should Not Be True ${rc}
[Return] ${port_ip}
Should Not Be True ${rc}
[Return] ${port_ip}
[Arguments] ${port_name} ${conn_id}=${devstack_conn_id}
[Documentation] Keyword would return the MAC ID of the ${port_name} received.
${rc} ${output}= Run And Return Rc And Output openstack port show ${port_name} | grep mac_address | awk '{print $4}'
[Arguments] ${port_name} ${conn_id}=${devstack_conn_id}
[Documentation] Keyword would return the MAC ID of the ${port_name} received.
${rc} ${output}= Run And Return Rc And Output openstack port show ${port_name} | grep mac_address | awk '{print $4}'
${splitted_output}= Split String ${output} ${EMPTY}
${port_mac}= Get from List ${splitted_output} 0
${splitted_output}= Split String ${output} ${EMPTY}
${port_mac}= Get from List ${splitted_output} 0
Should Not Be True ${rc}
[Return] ${port_mac}
Should Not Be True ${rc}
[Return] ${port_mac}
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${l2gw_id}= Get from List ${splitted_output} 0
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${l2gw_id}= Get from List ${splitted_output} 0
[Return] ${l2gw_id}
Get L2gw Connection Id
[Return] ${l2gw_id}
Get L2gw Connection Id
[Documentation] Keyword to retrieve the L2 Gateway Connection ID for the ${l2gw_name} (Using Neutron CLI).
${l2gw_id}= OpenStackOperations.Get L2gw Id ${l2gw_name}
${rc} ${output}= Run And Return Rc And Output ${L2GW_GET_CONN} | grep "${l2gw_id}" | awk '{print $2}'
[Documentation] Keyword to retrieve the L2 Gateway Connection ID for the ${l2gw_name} (Using Neutron CLI).
${l2gw_id}= OpenStackOperations.Get L2gw Id ${l2gw_name}
${rc} ${output}= Run And Return Rc And Output ${L2GW_GET_CONN} | grep "${l2gw_id}" | awk '{print $2}'
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${splitted_output}= Split String ${output} ${EMPTY}
${l2gw_conn_id}= Get from List ${splitted_output} 0
Should Not Be True ${rc}
${splitted_output}= Split String ${output} ${EMPTY}
${splitted_output}= Split String ${output} ${EMPTY}
${l2gw_conn_id}= Get from List ${splitted_output} 0
[Return] ${l2gw_conn_id}
Neutron Port List Rest
[Return] ${l2gw_conn_id}
Neutron Port List Rest
[Documentation] Remove the security group provided to the given VM.
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
[Documentation] Remove the security group provided to the given VM.
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt openstack server remove security group ${vm} ${sg}
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log openstack server remove security group ${vm} ${sg}
Close Connection
Create SFC Flow Classifier
[Arguments] ${name} ${src_ip} ${dest_ip} ${protocol} ${dest_port} ${neutron_src_port}
[Documentation] Create a flow classifier for SFC
Close Connection
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 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}
+ ${rc} ${output}= Run And Return Rc And Output 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 ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
Log ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
[Documentation] Delete a SFC flow classifier
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
[Documentation] Delete a SFC flow classifier
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${cmd}= Set Variable openstack sfc flow classifier delete ${name}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output openstack sfc flow classifier delete ${name}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
[Documentation] Creates a neutron port pair for SFC
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
[Documentation] Creates a neutron port pair for SFC
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${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}
+ ${rc} ${output}= Run And Return Rc And Output openstack sfc port pair create --ingress=${port_in} --egress=${port_out} ${name}
Log ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
Log ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
Delete SFC Port Pair
[Arguments] ${name}
[Documentation] Delete a SFC port pair
Delete SFC Port Pair
[Arguments] ${name}
[Documentation] Delete a SFC port pair
- ${cmd}= Set Variable openstack sfc port pair delete ${name}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output openstack sfc port pair delete ${name}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Create SFC Port Pair Group
[Arguments] ${name} ${port_pair}
[Documentation] Creates a port pair group with a single port pair for SFC
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 openstack sfc port pair group create --port-pair ${port_pair} ${name}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output openstack sfc port pair group create --port-pair ${port_pair} ${name}
Log ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
Log ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
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
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 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}
+ ${rc} ${output}= Run And Return Rc And Output openstack sfc port pair group create --port-pair ${port_pair1} --port-pair ${port_pair2} ${name}
Log ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
Log ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
[Arguments] ${name}
[Documentation] Delete a SFC port pair group
${devstack_conn_id}= Get ControlNode Connection
[Arguments] ${name}
[Documentation] Delete a SFC port pair group
${devstack_conn_id}= Get ControlNode Connection
- ${cmd}= Set Variable openstack sfc port pair group delete ${name}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output openstack sfc port pair group delete ${name}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Log ${output}
Should Not Be True ${rc}
[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.
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 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}
+ ${rc} ${output}= Run And Return Rc And Output openstack sfc port chain create --port-pair-group ${pg1} --port-pair-group ${pg2} --flow-classifier ${fc} ${name}
Log ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
Log ${output}
Should Not Be True ${rc}
Should Contain ${output} ${name}
Delete SFC Port Chain
[Arguments] ${name}
[Documentation] Delete a SFC port chain
Delete SFC Port Chain
[Arguments] ${name}
[Documentation] Delete a SFC port chain
- ${cmd}= Set Variable openstack sfc port chain delete ${name}
- Log ${cmd}
- ${rc} ${output}= Run And Return Rc And Output ${cmd}
+ ${rc} ${output}= Run And Return Rc And Output openstack sfc port chain delete ${name}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
Log ${output}
Should Not Be True ${rc}
[Return] ${output}
[Documentation] Remove RSA
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
[Documentation] Remove RSA
${devstack_conn_id}= Get ControlNode Connection
Switch Connection ${devstack_conn_id}
- ${output}= Write Commands Until Prompt sudo cat /root/.ssh/known_hosts 30s
- Log ${output}
- ${output}= Write Commands Until Prompt sudo ssh-keygen -f "/root/.ssh/known_hosts" -R ${vm_ip} 30s
- Log ${output}
+ ${output}= Write Commands Until Prompt And Log sudo cat /root/.ssh/known_hosts 30s
+ ${output}= Write Commands Until Prompt And Log sudo ssh-keygen -f "/root/.ssh/known_hosts" -R ${vm_ip} 30s
${output}= Write Commands Until Prompt sudo cat "/root/.ssh/known_hosts" 30s
Wait For Routes To Propogate
${output}= Write Commands Until Prompt sudo cat "/root/.ssh/known_hosts" 30s
Wait For Routes To Propogate
[Teardown] SSHKeywords.Restore_Current_SSH_Connection_From_Index ${current_ssh_connection.index}
[Return] ${stdout}
[Teardown] SSHKeywords.Restore_Current_SSH_Connection_From_Index ${current_ssh_connection.index}
[Return] ${stdout}
+Run Command On Remote System And Log
+ [Arguments] ${system} ${cmd} ${user}=${DEFAULT_USER} ${password}=${EMPTY} ${prompt}=${DEFAULT_LINUX_PROMPT} ${prompt_timeout}=${DEFAULT_TIMEOUT}
+ [Documentation] Reduces the common work of running a command on a remote system to a single higher level
+ ... robot keyword, taking care to log in with a public key and. The command given is written
+ ... and the output returned. No test conditions are checked.
+ ${output} = Run Command On Remote System ${system} ${cmd} ${user} ${password} ${prompt}
+ ... ${prompt_timeout}
+ Log ${output}
+ [Return] ${output}
+
Run Command On Mininet
[Arguments] ${system}=${TOOLS_SYSTEM_IP} ${cmd}=echo ${user}=${TOOLS_SYSTEM_USER} ${password}=${TOOLS_SYSTEM_PASSWORD} ${prompt}=${TOOLS_SYSTEM_PROMPT}
[Documentation] Call Run Comand On Remote System, but with default values suitable for Mininet machine.
Run Command On Mininet
[Arguments] ${system}=${TOOLS_SYSTEM_IP} ${cmd}=echo ${user}=${TOOLS_SYSTEM_USER} ${password}=${TOOLS_SYSTEM_PASSWORD} ${prompt}=${TOOLS_SYSTEM_PROMPT}
[Documentation] Call Run Comand On Remote System, but with default values suitable for Mininet machine.