Log ${output}
Should Contain ${output} Created a new network
+List Networks
+ [Documentation] List networks and return output with neutron client.
+ ${devstack_conn_id}= Get ControlNode Connection
+ Switch Connection ${devstack_conn_id}
+ ${output}= Write Commands Until Prompt neutron net-list 30s
+ Close Connection
+ Log ${output}
+ [Return] ${output}
+
Delete Network
[Arguments] ${network_name}
[Documentation] Delete Network with neutron request.
Close Connection
Get Net Id
- [Arguments] ${network_name} ${connection_id}
+ [Arguments] ${network_name}
[Documentation] Retrieve the net id for the given network name to create specific vm instance
- Switch Connection ${connection_id}
+ ${devstack_conn_id}= Get ControlNode Connection
+ Switch Connection ${devstack_conn_id}
${output}= Write Commands Until Prompt neutron net-list | grep "${network_name}" | get_field 1 30s
+ Close Connection
Log ${output}
${splitted_output}= Split String ${output} ${EMPTY}
${net_id}= Get from List ${splitted_output} 0
[Documentation] Create X Vm Instance with the net id of the Netowrk.
${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}
: 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}
Log ${vm_ip}
${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}
Log ${net_id}
${output}= Write Commands Until Prompt sudo ip netns exec qdhcp-${net_id} ping -c 3 ${vm_ip} 20s
Log ${output}
Log ${vm_ip}
${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}
Log ${net_id}
${output}= Write Commands Until Prompt sudo ip netns exec qdhcp-${net_id} ping -c 3 ${vm_ip} 20s
Close Connection
[Documentation] Login to the vm instance using ssh in the network.
${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}
${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}
: FOR ${index} IN @{vm_indices}
\ ${output}= Write Commands Until Prompt nova show ${index} 30s
\ Log ${output}
- Close Connection
+ Close Connection
\ No newline at end of file