${output}= Write Commands Until Prompt neutron -v port-delete ${port_name} 30s
Close Connection
Log ${output}
- Should Contain ${output} Deleted a new port
+ Should Contain ${output} Deleted port: ${port_name}
List Ports
[Documentation] List ports and return output with neutron client.
[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
Switch Connection ${devstack_conn_id}
- ${port_id}= Write Commands Until Prompt neutron port-list | grep "${port_name}" | awk '{print $2}' 30s
+ ${output}= Write Commands Until Prompt neutron port-list | grep "${port_name}" | awk '{print $2}' 30s
+ Log ${output}
+ ${splitted_output}= Split String ${output} ${EMPTY}
+ ${port_id}= Get from List ${splitted_output} 0
Log ${port_id}
[Return] ${port_id}
Should be Equal As Strings ${resp.status_code} 200
Create Nova VMs
- [Documentation] Create two subnets for previously created networks
+ [Documentation] Create Vm instances on compute node with port
Create Vm Instance With Port On Compute Node ${PORT_LIST[0]} ${VM_INSTANCES[0]} ${OS_COMPUTE_1_IP}
Create Vm Instance With Port On Compute Node ${PORT_LIST[1]} ${VM_INSTANCES[1]} ${OS_COMPUTE_2_IP}
Create Vm Instance With Port On Compute Node ${PORT_LIST[2]} ${VM_INSTANCES[2]} ${OS_COMPUTE_1_IP}
Delete Neutron Ports
[Documentation] Delete Neutron Ports in the given Port List.
: FOR ${Port} IN @{PORT_LIST}
- \ Delete SubNet ${Port}
+ \ Delete Port ${Port}
Delete Sub Networks
[Documentation] Delete Sub Nets in the given Subnet List.