Create Network
[Arguments] ${network_name} ${additional_args}=${EMPTY} ${verbose}=TRUE
- [Documentation] Create Network with neutron request.
+ [Documentation] Create Network with openstack request.
${output} = OpenStack CLI openstack network create ${network_name} ${additional_args}
[Return] ${output}
Update SubNet
[Arguments] ${subnet_name} ${additional_args}=${EMPTY}
- [Documentation] Update subnet with neutron request.
+ [Documentation] Update subnet with openstack subnet set request.
${output} = OpenStack CLI openstack subnet set ${subnet_name} ${additional_args}
[Return] ${output}
+Unset SubNet
+ [Arguments] ${subnet_name} ${additional_args}=${EMPTY}
+ [Documentation] Update subnet with openstack subnet unset request
+ ${output} = OpenStack CLI openstack subnet unset ${subnet_name} ${additional_args}
+ [Return] ${output}
+
Show SubNet
[Arguments] ${subnet_name}
[Documentation] Show subnet with neutron request.
OpenStackOperations.Copy DHCP Files From Control Node
[Return] @{vm_ips} ${ips_and_console_log[1]}
+Get Subnet Gateway Ip
+ [Arguments] ${subnet_name}
+ [Documentation] Show information of a subnet and grep for subnet gateway ip address
+ ${output} = OpenStackOperations.OpenStack CLI openstack subnet show ${subnet_name} | grep gateway_ip | awk '{print $4}'
+ ${splitted_output} = String.Split String ${output} ${EMPTY}
+ ${matches} = Collections.Get Matches ${splitted_output} regexp=(\\d\.)+
+ ${subnet_gateway_ip} = String.Strip String ${matches[0]} characters=','
+ [Return] ${subnet_gateway_ip}
+
Collect VM IPv6 SLAAC Addresses
[Arguments] ${fail_on_none} ${vm_list} ${network} ${subnet}
[Documentation] For each VM parse output of "openstack server show" to get its IPv6 address from Neutron DB.
\ ${is_ipv6} = String.Get Regexp Matches @{subnets}[${INDEX}] ${IP6_REGEX}
\ ${length} = BuiltIn.Get Length ${is_ipv6}
\ ${cmd} = BuiltIn.Set Variable If ${length} == 0 ip route ip -6 route
- \ ${output} = Utils.Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ${cmd} ]>
+ \ ${output} = Utils.Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ${cmd} ${DEFAULT_LINUX_PROMPT_STRICT}
\ BuiltIn.Should Contain ${output} @{subnets}[${INDEX}]
Neutron Cleanup