Should Contain ${output} Created a new subnet
Create Port
- [Arguments] ${network_name} ${port_name} ${sg}=default
+ [Arguments] ${network_name} ${port_name} ${sg}=default ${additional_args}=${EMPTY}
[Documentation] Create Port with neutron request.
${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} --security-group ${sg} 30s
+ ${output}= Write Commands Until Prompt neutron -v port-create ${network_name} --name ${port_name} --security-group ${sg} ${additional_args} 30s
Close Connection
Log ${output}
Should Contain ${output} Created a new port
Switch Connection ${devstack_conn_id}
${net_id} = Get Net Id ${net_name} ${devstack_conn_id}
Log ${vm_ip}
- ${output} = Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ssh ${user}@${vm_ip} -o ConnectTimeout=10 -o StrictHostKeyChecking=no d:
+ ${output} = Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ssh ${user}@${vm_ip} -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null d:
Log ${output}
${output} = Write Commands Until Expected Prompt ${password} ${OS_SYSTEM_PROMPT}
Log ${output}
Switch Connection ${devstack_conn_id}
Log ${src_ip}
${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
- ${output}= Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no ${user}@${src_ip} d:
+ ${output}= Write Commands Until Expected Prompt sudo ip netns exec qdhcp-${net_id} ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no ${user}@${src_ip} -o UserKnownHostsFile=/dev/null d:
Log ${output}
${output}= Write Commands Until Expected Prompt ${password} ${OS_SYSTEM_PROMPT}
Log ${output}
Get Model Dump ${HA_PROXY_IP}
Get Karaf Log Events From Test Start ${test_name}
+Get Suite Teardown Debugs
+ Get OvsDebugInfo
+ Get Model Dump ${HA_PROXY_IP}
+
Show Debugs
[Arguments] @{vm_indices}
[Documentation] Run these commands for debugging, it can list state of VM instances and ip information in control node
Close Connection
[Return] ${output}
+Delete SecurityGroup
+ [Arguments] ${sg_name}
+ [Documentation] Delete Security group
+ ${devstack_conn_id}= Get ControlNode Connection
+ Switch Connection ${devstack_conn_id}
+ ${output}= Write Commands Until Prompt neutron security-group-delete ${sg_name} 40s
+ Log ${output}
+ Should Match Regexp ${output} Deleted security_group: ${sg_name}|Deleted security_group\\(s\\): ${sg_name}
+ Close Connection
+
Neutron Security Group Rule Create
[Arguments] ${Security_group_name} &{Kwargs}
[Documentation] Creates neutron security rule with neutron request with or without optional params, here security group name is mandatory args, rule with optional params can be created by passing the optional args values ex: direction=${INGRESS_EGRESS}, Then these optional params are catenated with mandatory args, example of usage: "Neutron Security Group Rule Create ${SGP_SSH} direction=${RULE_PARAMS[0]} ethertype=${RULE_PARAMS[1]} ..."
Log ${port_id}
Close Connection
[Return] ${OUTPUT} ${port_id}
+
+Get Ports MacAddr
+ [Arguments] ${portName_list}
+ [Documentation] Retrieve the port MacAddr for the given list of port name and return the MAC address list.
+ ${devstack_conn_id}= Get ControlNode Connection
+ Switch Connection ${devstack_conn_id}
+ ${MacAddr-list} Create List
+ : FOR ${portName} IN @{portName_list}
+ \ ${output} = Write Commands Until Prompt neutron port-list | grep "${portName}" | awk '{print $6}' 30s
+ \ Log ${output}
+ \ ${splitted_output}= Split String ${output} ${EMPTY}
+ \ ${macAddr}= Get from List ${splitted_output} 0
+ \ Log ${macAddr}
+ \ Append To List ${MacAddr-list} ${macAddr}
+ [Return] ${MacAddr-list}
+
+Delete SecurityGroup
+ [Arguments] ${sg_name}
+ [Documentation] Delete Security group
+ ${devstack_conn_id}= Get ControlNode Connection
+ Switch Connection ${devstack_conn_id}
+ ${output}= Write Commands Until Prompt neutron security-group-delete ${sg_name} 40s
+ Log ${output}
+ Should Match Regexp ${output} Deleted security_group: ${sg_name}|Deleted security_group\\(s\\): ${sg_name}
+ Close Connection