2 Documentation Openstack library. This library is useful for tests to create network, subnet, router and vm instances
6 Resource L2GatewayOperations.robot
7 Resource ../variables/Variables.robot
11 [Arguments] ${force}=no ${source_pwd}=yes
12 [Documentation] Sourcing the Openstack PAsswords for neutron configurations
13 Run Keyword If '${source_pwd}' == 'yes' or '${force}' == 'yes' Write Commands Until Prompt cd ${DEVSTACK_DEPLOY_PATH}; source openrc admin admin
15 Get Tenant ID From Security Group
16 [Documentation] Returns tenant ID by reading it from existing default security-group.
17 ${devstack_conn_id}= Get ControlNode Connection
18 Switch Connection ${devstack_conn_id}
19 ${output}= Write Commands Until Prompt neutron security-group-show default | grep "| tenant_id" | awk '{print $4}'
23 Get Tenant ID From Network
24 [Arguments] ${network_uuid}
25 [Documentation] Returns tenant ID by reading it from existing network.
26 ${resp}= Get_From_Uri uri=${CONFIG_API}/neutron:neutron/networks/network/${network_uuid}/ accept=${ACCEPT_EMPTY} session=session
27 ${tenant_id}= Utils.Extract Value From Content ${resp} /network/0/tenant-id strip
31 [Arguments] ${network_name} ${additional_args}=${EMPTY} ${verbose}=TRUE
32 [Documentation] Create Network with neutron request.
33 ${devstack_conn_id}= Get ControlNode Connection
34 Switch Connection ${devstack_conn_id}
35 ${command} Set Variable If "${verbose}" == "TRUE" neutron -v net-create ${network_name} ${additional_args} neutron net-create ${network_name} ${additional_args} | grep -w id | awk '{print $4}'
36 ${output}= Write Commands Until Prompt ${command} 30s
41 [Documentation] List networks and return output with neutron client.
42 ${devstack_conn_id}= Get ControlNode Connection
43 Switch Connection ${devstack_conn_id}
44 ${output}= Write Commands Until Prompt neutron net-list 30s
50 [Documentation] List subnets and return output with neutron client.
51 ${devstack_conn_id}= Get ControlNode Connection
52 Switch Connection ${devstack_conn_id}
53 ${output}= Write Commands Until Prompt neutron subnet-list 30s
59 [Arguments] ${network_name}
60 [Documentation] Delete Network with neutron request.
61 ${devstack_conn_id}= Get ControlNode Connection
62 Switch Connection ${devstack_conn_id}
63 ${output}= Write Commands Until Prompt neutron -v net-delete ${network_name} 30s
66 Should Match Regexp ${output} Deleted network: ${network_name}|Deleted network\\(s\\): ${network_name}
69 [Arguments] ${network_name} ${subnet} ${range_ip} ${additional_args}=${EMPTY}
70 [Documentation] Create SubNet for the Network with neutron request.
71 ${devstack_conn_id}= Get ControlNode Connection
72 Switch Connection ${devstack_conn_id}
73 ${output}= Write Commands Until Prompt neutron -v subnet-create ${network_name} ${range_ip} --name ${subnet} ${additional_args} 30s
76 Should Contain ${output} Created a new subnet
79 [Arguments] ${network_name} ${port_name} ${sg}=default ${additional_args}=${EMPTY}
80 [Documentation] Create Port with neutron request.
81 ${devstack_conn_id}= Get ControlNode Connection
82 Switch Connection ${devstack_conn_id}
83 ${output}= Write Commands Until Prompt neutron -v port-create ${network_name} --name ${port_name} --security-group ${sg} ${additional_args} 30s
86 Should Contain ${output} Created a new port
89 [Arguments] ${port_name}
90 [Documentation] Delete Port with neutron request.
91 ${devstack_conn_id}= Get ControlNode Connection
92 Switch Connection ${devstack_conn_id}
93 ${output}= Write Commands Until Prompt neutron -v port-delete ${port_name} 30s
96 Should Match Regexp ${output} Deleted port: ${port_name}|Deleted port\\(s\\): ${port_name}
99 [Documentation] List ports and return output with neutron client.
100 ${devstack_conn_id}= Get ControlNode Connection
101 Switch Connection ${devstack_conn_id}
102 ${output}= Write Commands Until Prompt neutron port-list 30s
108 [Documentation] List VMs and return output with nova client.
109 ${devstack_conn_id}= Get ControlNode Connection
110 Switch Connection ${devstack_conn_id}
111 ${output}= Write Commands Until Prompt nova list 30s
116 Create And Associate Floating IPs
117 [Arguments] ${external_net} @{vm_list}
118 [Documentation] Create and associate floating IPs to VMs with nova request
119 ${devstack_conn_id}= Get ControlNode Connection
120 Switch Connection ${devstack_conn_id}
121 ${ip_list}= Create List @{EMPTY}
122 : FOR ${vm} IN @{vm_list}
123 \ ${output}= Write Commands Until Prompt neutron floatingip-create ${external_net} 30s
125 \ @{ip} Get Regexp Matches ${output} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
126 \ ${ip_length} Get Length ${ip}
127 \ Run Keyword If ${ip_length}>0 Append To List ${ip_list} @{ip}[0]
128 \ ... ELSE Append To List ${ip_list} None
129 \ ${output}= Write Commands Until Prompt nova floating-ip-associate ${vm} @{ip}[0] 30s
134 [Documentation] Verifies the Gateway Ips with dump flow.
135 ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
137 : FOR ${GatewayIpElement} IN @{GATEWAY_IPS}
138 \ Should Contain ${output} ${GatewayIpElement}
141 [Documentation] Verifies the Dhcp Ips with dump flow.
142 ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
144 : FOR ${DhcpIpElement} IN @{DHCP_IPS}
145 \ Should Contain ${output} ${DhcpIpElement}
148 [Documentation] Verifies the Dhcp Ips with dump flow.
149 ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
151 : FOR ${DhcpIpElement} IN @{DHCP_IPS}
152 \ Should Not Contain ${output} ${DhcpIpElement}
155 [Arguments] ${subnet}
156 [Documentation] Delete SubNet for the Network with neutron request.
158 ${devstack_conn_id}= Get ControlNode Connection
159 Switch Connection ${devstack_conn_id}
160 ${output}= Write Commands Until Prompt neutron -v subnet-delete ${subnet}
163 Should Match Regexp ${output} Deleted subnet: ${subnet}|Deleted subnet\\(s\\): ${subnet}
165 Verify No Gateway Ips
166 [Documentation] Verifies the Gateway Ips removed with dump flow.
167 ${output}= Write Commands Until Prompt sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
169 : FOR ${GatewayIpElement} IN @{GATEWAY_IPS}
170 \ Should Not Contain ${output} ${GatewayIpElement}
173 [Arguments] ${vm_name}
174 [Documentation] Delete Vm instances using instance names.
175 ${devstack_conn_id}= Get ControlNode Connection
176 Switch Connection ${devstack_conn_id}
177 ${output}= Write Commands Until Prompt nova force-delete ${vm_name} 40s
181 [Arguments] ${network_name} ${devstack_conn_id}
182 [Documentation] Retrieve the net id for the given network name to create specific vm instance
183 Switch Connection ${devstack_conn_id}
184 ${output}= Write Commands Until Prompt neutron net-list | grep "${network_name}" | awk '{print $2}' 30s
186 ${splitted_output}= Split String ${output} ${EMPTY}
187 ${net_id}= Get from List ${splitted_output} 0
192 [Arguments] ${subnet_name} ${devstack_conn_id}
193 [Documentation] Retrieve the subnet id for the given subnet name
194 Switch Connection ${devstack_conn_id}
195 ${output}= Write Commands Until Prompt neutron subnet-list | grep "${subnet_name}" | awk '{print $2}' 30s
197 ${splitted_output}= Split String ${output} ${EMPTY}
198 ${subnet_id}= Get from List ${splitted_output} 0
200 [Return] ${subnet_id}
203 [Arguments] ${port_name} ${devstack_conn_id}
204 [Documentation] Retrieve the port id for the given port name to attach specific vm instance to a particular port
205 Switch Connection ${devstack_conn_id}
206 ${output}= Write Commands Until Prompt neutron port-list | grep "${port_name}" | awk '{print $2}' 30s
208 ${splitted_output}= Split String ${output} ${EMPTY}
209 ${port_id}= Get from List ${splitted_output} 0
214 [Arguments] ${router1} ${devstack_conn_id}
215 [Documentation] Retrieve the router id for the given router name
216 Switch Connection ${devstack_conn_id}
217 ${output}= Write Commands Until Prompt neutron router-list | grep "${router1}" | awk '{print $2}' 30s
219 ${splitted_output}= Split String ${output} ${EMPTY}
220 ${router_id}= Get from List ${splitted_output} 0
222 [Return] ${router_id}
225 [Arguments] ${net_name} ${vm_instance_names} ${image}=cirros-0.3.4-x86_64-uec ${flavor}=m1.nano ${sg}=default
226 [Documentation] Create X Vm Instance with the net id of the Netowrk.
227 ${devstack_conn_id}= Get ControlNode Connection
228 Switch Connection ${devstack_conn_id}
229 ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
230 : FOR ${VmElement} IN @{vm_instance_names}
231 \ ${output}= Write Commands Until Prompt nova boot --image ${image} --flavor ${flavor} --nic net-id=${net_id} ${VmElement} --security-groups ${sg} 30s
234 Create Vm Instance With Port
235 [Arguments] ${port_name} ${vm_instance_name} ${image}=cirros-0.3.4-x86_64-uec ${flavor}=m1.nano ${sg}=default
236 [Documentation] Create One VM instance using given ${port_name} and for given ${compute_node}
237 ${devstack_conn_id}= Get ControlNode Connection
238 Switch Connection ${devstack_conn_id}
239 ${port_id}= Get Port Id ${port_name} ${devstack_conn_id}
240 ${output}= Write Commands Until Prompt nova boot --image ${image} --flavor ${flavor} --nic port-id=${port_id} ${vm_instance_name} --security-groups ${sg} 30s
243 Create Vm Instance With Ports
244 [Arguments] ${port_name} ${port2_name} ${vm_instance_name} ${image}=cirros-0.3.4-x86_64-uec ${flavor}=m1.nano ${sg}=default
245 [Documentation] Create One VM instance using given ${port_name} and for given ${compute_node}
246 ${devstack_conn_id}= Get ControlNode Connection
247 Switch Connection ${devstack_conn_id}
248 ${port_id}= Get Port Id ${port_name} ${devstack_conn_id}
249 ${port2_id}= Get Port Id ${port2_name} ${devstack_conn_id}
250 ${output}= Write Commands Until Prompt nova boot --image ${image} --flavor ${flavor} --nic port-id=${port_id} --nic port-id=${port2_id} ${vm_instance_name} --security-groups ${sg} 30s
253 Create Vm Instance With Port On Compute Node
254 [Arguments] ${port_name} ${vm_instance_name} ${compute_node} ${image}=cirros-0.3.4-x86_64-uec ${flavor}=m1.nano ${sg}=default
255 [Documentation] Create One VM instance using given ${port_name} and for given ${compute_node}
256 ${devstack_conn_id}= Get ControlNode Connection
257 Switch Connection ${devstack_conn_id}
258 ${port_id}= Get Port Id ${port_name} ${devstack_conn_id}
259 ${hostname_compute_node}= Run Command On Remote System ${compute_node} hostname
260 ${output}= Write Commands Until Prompt nova boot --image ${image} --flavor ${flavor} --nic port-id=${port_id} ${vm_instance_name} --security-groups ${sg} --availability-zone nova:${hostname_compute_node} 30s
264 [Arguments] ${vm_name}
265 [Documentation] Run these commands to check whether the created vm instance is active or not.
266 ${devstack_conn_id}= Get ControlNode Connection
267 Switch Connection ${devstack_conn_id}
268 ${output}= Write Commands Until Prompt nova show ${vm_name} | grep OS-EXT-STS:vm_state 30s
270 Should Contain ${output} active
272 Collect VM IP Addresses
273 [Arguments] ${fail_on_none} @{vm_list}
274 [Documentation] Using nova console-log on the provided ${vm_list} to search for the string "obtained" which
275 ... correlates to the instance receiving it's IP address via DHCP. Also retrieved is the ip of the nameserver
276 ... if available in the console-log output. The keyword will also return a list of the learned ips as it
277 ... finds them in the console log output, and will have "None" for Vms that no ip was found.
278 ${devstack_conn_id}= Get ControlNode Connection
279 Switch Connection ${devstack_conn_id}
280 ${ip_list} Create List @{EMPTY}
281 : FOR ${vm} IN @{vm_list}
282 \ ${vm_ip_line}= Write Commands Until Prompt nova console-log ${vm} | grep -i "obtained" 30s
284 \ @{vm_ip} Get Regexp Matches ${vm_ip_line} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
285 \ ${vm_ip_length} Get Length ${vm_ip}
286 \ Run Keyword If ${vm_ip_length}>0 Append To List ${ip_list} @{vm_ip}[0]
287 \ ... ELSE Append To List ${ip_list} None
288 \ ${dhcp_ip_line}= Write Commands Until Prompt nova console-log ${vm} | grep "^nameserver" 30s
289 \ Log ${dhcp_ip_line}
290 \ ${dhcp_ip} Get Regexp Matches ${dhcp_ip_line} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
291 \ ${dhcp_ip_length} Get Length ${dhcp_ip}
292 \ Run Keyword If ${dhcp_ip_length}<=0 Append To List ${dhcp_ip} None
294 ${dhcp_length} Get Length ${dhcp_ip}
295 Run Keyword If '${fail_on_none}' == 'true' Should Not Contain ${ip_list} None
296 Run Keyword If '${fail_on_none}' == 'true' Should Not Contain ${dhcp_ip} None
297 Should Be True ${dhcp_length} <= 1
298 Return From Keyword If ${dhcp_length}==0 ${ip_list} ${EMPTY}
299 [Return] ${ip_list} ${dhcp_ip}
302 [Arguments] ${vm_instance_names}
303 [Documentation] View Console log of the created vm instances using nova show.
304 : FOR ${VmElement} IN @{vm_instance_names}
305 \ ${output}= Write Commands Until Prompt nova show ${VmElement}
307 \ ${output}= Write Commands Until Prompt nova console-log ${VmElement}
310 Ping Vm From DHCP Namespace
311 [Arguments] ${net_name} ${vm_ip}
312 [Documentation] Reach all Vm Instance with the net id of the Netowrk.
314 ${devstack_conn_id}= Get ControlNode Connection
315 Switch Connection ${devstack_conn_id}
316 ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
318 ${output}= Write Commands Until Prompt sudo ip netns exec qdhcp-${net_id} ping -c 3 ${vm_ip} 20s
321 Should Contain ${output} 64 bytes
323 Ping From DHCP Should Not Succeed
324 [Arguments] ${net_name} ${vm_ip}
325 [Documentation] Should Not Reach Vm Instance with the net id of the Netowrk.
327 ${devstack_conn_id}= Get ControlNode Connection
328 Switch Connection ${devstack_conn_id}
329 ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
331 ${output}= Write Commands Until Prompt sudo ip netns exec qdhcp-${net_id} ping -c 3 ${vm_ip} 20s
334 Should Not Contain ${output} 64 bytes
336 Ping Vm From Control Node
337 [Arguments] ${vm_floating_ip} ${additional_args}=${EMPTY}
338 [Documentation] Ping VM floating IP from control node
339 Log ${vm_floating_ip}
340 ${devstack_conn_id}= Get ControlNode Connection
341 Switch Connection ${devstack_conn_id}
342 ${output}= Write Commands Until Prompt ping ${additional_args} -c 3 ${vm_floating_ip} 20s
345 Should Contain ${output} 64 bytes
348 [Arguments] ${dest_vm_ip}
349 [Documentation] Ping to the expected destination ip.
350 ${output}= Write Commands Until Expected Prompt ping -c 3 ${dest_vm_ip} ${OS_SYSTEM_PROMPT}
355 [Documentation] Ping to the expected destination ip.
356 ${output}= Write Commands Until Expected Prompt curl -i http://169.254.169.254 ${OS_SYSTEM_PROMPT}
357 Write Commands Until Prompt exit
358 Should Contain ${output} 200
361 [Documentation] Exit the vm instance.
362 ${output}= Write Commands Until Prompt exit
365 Check If Console Is VmInstance
366 [Arguments] ${console}=cirros
367 [Documentation] Check if the session has been able to login to the VM instance
368 ${output}= Write Commands Until Expected Prompt id ${OS_SYSTEM_PROMPT}
369 Should Contain ${output} ${console}
372 [Documentation] Check if the session has been able to login to the VM instance and exit the instance
373 ${rcode}= Run Keyword And Return Status Check If Console Is VmInstance cirros
374 Run Keyword If ${rcode} Write Commands Until Prompt exit
377 [Arguments] ${ip_address} ${ttl}=64
378 [Documentation] Run Ping command on the IP available as argument
379 ${output}= Write Commands Until Expected Prompt ping -t ${ttl} -c 3 ${ip_address} ${OS_SYSTEM_PROMPT}
380 Should Contain ${output} 64 bytes
382 Check Metadata Access
383 [Documentation] Try curl on the Metadataurl and check if it is okay
384 ${output}= Write Commands Until Expected Prompt curl -i http://169.254.169.254 ${OS_SYSTEM_PROMPT}
385 Should Contain ${output} 200
387 Execute Command on VM Instance
388 [Arguments] ${net_name} ${vm_ip} ${cmd} ${user}=cirros ${password}=cubswin:)
389 [Documentation] Login to the vm instance using ssh in the network, executes a command inside the VM and returns the ouput.
390 ${devstack_conn_id} = Get ControlNode Connection
391 Switch Connection ${devstack_conn_id}
392 ${net_id} = Get Net Id ${net_name} ${devstack_conn_id}
394 ${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:
396 ${output} = Write Commands Until Expected Prompt ${password} ${OS_SYSTEM_PROMPT}
398 ${rcode} = Run Keyword And Return Status Check If Console Is VmInstance
399 ${output} = Run Keyword If ${rcode} Write Commands Until Expected Prompt ${cmd} ${OS_SYSTEM_PROMPT}
400 [Teardown] Exit From Vm Console
403 Test Operations From Vm Instance
404 [Arguments] ${net_name} ${src_ip} ${dest_ips} ${user}=cirros ${password}=cubswin:) ${ttl}=64
405 [Documentation] Login to the vm instance using ssh in the network.
406 ${devstack_conn_id}= Get ControlNode Connection
407 Switch Connection ${devstack_conn_id}
409 ${net_id}= Get Net Id ${net_name} ${devstack_conn_id}
410 ${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:
412 ${output}= Write Commands Until Expected Prompt ${password} ${OS_SYSTEM_PROMPT}
414 ${rcode}= Run Keyword And Return Status Check If Console Is VmInstance
415 Run Keyword If ${rcode} Write Commands Until Expected Prompt ifconfig ${OS_SYSTEM_PROMPT}
416 Run Keyword If ${rcode} Write Commands Until Expected Prompt route ${OS_SYSTEM_PROMPT}
417 Run Keyword If ${rcode} Write Commands Until Expected Prompt arp -an ${OS_SYSTEM_PROMPT}
418 : FOR ${dest_ip} IN @{dest_ips}
420 \ ${string_empty}= Run Keyword And Return Status Should Be Empty ${dest_ip}
421 \ Run Keyword If ${string_empty} Continue For Loop
422 \ Run Keyword If ${rcode} Check Ping ${dest_ip} ttl=${ttl}
423 Run Keyword If ${rcode} Check Metadata Access
424 [Teardown] Exit From Vm Console
426 Install Netcat On Controller
427 [Documentation] Installs Netcat on the controller - this probably shouldn't be here
428 ${devstack_conn_id}= Get ControlNode Connection
429 Switch Connection ${devstack_conn_id}
430 ${output}= Write Commands Until Prompt sudo yum install -y nc
434 Test Netcat Operations From Vm Instance
435 [Arguments] ${net_name} ${vm_ip} ${dest_ip} ${additional_args}=${EMPTY} ${port}=12345 ${user}=cirros
436 ... ${password}=cubswin:)
437 [Documentation] Use Netcat to test TCP/UDP connections to the controller
438 ${client_data} Set Variable Test Client Data
439 ${server_data} Set Variable Test Server Data
440 ${devstack_conn_id}= Get ControlNode Connection
441 Switch Connection ${devstack_conn_id}
443 ${output}= Write Commands Until Prompt ( ( echo "${server_data}" | sudo timeout 60 nc -l ${additional_args} ${port} ) & )
445 ${output}= Write Commands Until Prompt sudo netstat -nlap | grep ${port}
447 ${nc_output}= Execute Command on VM Instance ${net_name} ${vm_ip} sudo echo "${client_data}" | nc -v -w 5 ${additional_args} ${dest_ip} ${port}
449 ${output}= Execute Command on VM Instance ${net_name} ${vm_ip} sudo route -n
451 ${output}= Execute Command on VM Instance ${net_name} ${vm_ip} sudo arp -an
453 Should Match Regexp ${nc_output} ${server_data}
456 [Arguments] ${list_of_external_dst_ips}
457 [Documentation] Check reachability with other network's instances.
458 ${rcode}= Run Keyword And Return Status Check If Console Is VmInstance
459 : FOR ${dest_ip} IN @{list_of_external_dst_ips}
461 \ Check Ping ${dest_ip}
464 [Arguments] ${router_name}
465 [Documentation] Create Router and Add Interface to the subnets.
466 ${devstack_conn_id}= Get ControlNode Connection
467 Switch Connection ${devstack_conn_id}
468 ${output}= Write Commands Until Prompt neutron -v router-create ${router_name} 30s
470 Should Contain ${output} Created a new router
473 [Documentation] List Router and return output with neutron client.
474 ${devstack_conn_id}= Get ControlNode Connection
475 Switch Connection ${devstack_conn_id}
476 ${output}= Write Commands Until Prompt neutron router-list 30s
482 [Arguments] ${router_name} ${interface_name}
483 ${devstack_conn_id}= Get ControlNode Connection
484 Switch Connection ${devstack_conn_id}
485 ${output}= Write Commands Until Prompt neutron -v router-interface-add ${router_name} ${interface_name}
487 Should Contain ${output} Added interface
489 Show Router Interface
490 [Arguments] ${router_name}
491 [Documentation] List Router interface associated with given Router and return output with neutron client.
492 ${devstack_conn_id}= Get ControlNode Connection
493 Switch Connection ${devstack_conn_id}
494 ${output}= Write Commands Until Prompt neutron router-port-list ${router_name} -f csv 30s
500 [Arguments] ${router_name} ${network_name}
501 ${devstack_conn_id}= Get ControlNode Connection
502 Switch Connection ${devstack_conn_id}
503 ${output}= Write Commands Until Prompt neutron -v router-gateway-set ${router_name} ${network_name}
505 Should Contain ${output} Set gateway
508 [Arguments] ${router_name} ${interface_name}
509 [Documentation] Remove Interface to the subnets.
510 ${devstack_conn_id}= Get ControlNode Connection
511 Switch Connection ${devstack_conn_id}
512 ${output}= Write Commands Until Prompt neutron -v router-interface-delete ${router_name} ${interface_name}
514 Should Contain ${output} Removed interface from router
517 [Arguments] ${router_name} ${cmd}
518 [Documentation] Update the router with the command. Router name and command should be passed as argument.
519 ${devstack_conn_id} = Get ControlNode Connection
520 Switch Connection ${devstack_conn_id}
521 ${output} = Write Commands Until Prompt neutron router-update ${router_name} ${cmd} 30s
523 Should Contain ${output} Updated
526 [Arguments] ${router_name} ${options}
527 [Documentation] Show information of a given router. Router name and optional fields should be sent as arguments.
528 ${devstack_conn_id} = Get ControlNode Connection
529 Switch Connection ${devstack_conn_id}
530 ${output} = Write Commands Until Prompt neutron router-show ${router_name} ${options} 30s
535 [Arguments] ${router_name}
536 [Documentation] Delete Router and Interface to the subnets.
537 ${devstack_conn_id}= Get ControlNode Connection
538 Switch Connection ${devstack_conn_id}
539 ${output}= Write Commands Until Prompt neutron -v router-delete ${router_name} 60s
541 Should Match Regexp ${output} Deleted router: ${router_name}|Deleted router\\(s\\): ${router_name}
543 Get DumpFlows And Ovsconfig
544 [Arguments] ${openstack_node_ip}
545 [Documentation] Get the OvsConfig and Flow entries from OVS from the Openstack Node
546 Log ${openstack_node_ip}
547 SSHLibrary.Open Connection ${openstack_node_ip} prompt=${DEFAULT_LINUX_PROMPT}
548 Utils.Flexible SSH Login ${OS_USER} ${DEVSTACK_SYSTEM_PASSWORD}
549 SSHLibrary.Set Client Configuration timeout=${default_devstack_prompt_timeout}
550 Write Commands Until Expected Prompt ip -o link ${DEFAULT_LINUX_PROMPT_STRICT}
551 Write Commands Until Expected Prompt ip -o addr ${DEFAULT_LINUX_PROMPT_STRICT}
552 Write Commands Until Expected Prompt ip route ${DEFAULT_LINUX_PROMPT_STRICT}
553 Write Commands Until Expected Prompt arp -an ${DEFAULT_LINUX_PROMPT_STRICT}
554 ${nslist}= Write Commands Until Expected Prompt ip netns list | awk '{print $1}' ${DEFAULT_LINUX_PROMPT_STRICT}
555 @{lines} Split To Lines ${nslist}
556 : FOR ${line} IN @{lines}
557 \ Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o link ${DEFAULT_LINUX_PROMPT_STRICT}
558 \ Write Commands Until Expected Prompt sudo ip netns exec ${line} ip -o addr ${DEFAULT_LINUX_PROMPT_STRICT}
559 \ Write Commands Until Expected Prompt sudo ip netns exec ${line} ip route ${DEFAULT_LINUX_PROMPT_STRICT}
560 Write Commands Until Expected Prompt sudo ovs-vsctl show ${DEFAULT_LINUX_PROMPT_STRICT}
561 Write Commands Until Expected Prompt sudo ovs-vsctl list Open_vSwitch ${DEFAULT_LINUX_PROMPT_STRICT}
562 Write Commands Until Expected Prompt sudo ovs-ofctl show br-int -OOpenFlow13 ${DEFAULT_LINUX_PROMPT_STRICT}
563 Write Commands Until Expected Prompt sudo ovs-ofctl dump-flows br-int -OOpenFlow13 ${DEFAULT_LINUX_PROMPT_STRICT}
564 Write Commands Until Expected Prompt sudo ovs-ofctl dump-groups br-int -OOpenFlow13 ${DEFAULT_LINUX_PROMPT_STRICT}
565 Write Commands Until Expected Prompt sudo ovs-ofctl dump-group-stats br-int -OOpenFlow13 ${DEFAULT_LINUX_PROMPT_STRICT}
567 Get Karaf Log Type From Test Start
568 [Arguments] ${ip} ${test_name} ${type} ${user}=${ODL_SYSTEM_USER} ${password}=${ODL_SYSTEM_PASSWORD} ${prompt}=${ODL_SYSTEM_PROMPT}
569 ... ${log_file}=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log
570 ${cmd} Set Variable sed '1,/ROBOT MESSAGE: Starting test ${test_name}/d' ${log_file} | grep '${type}'
571 ${output} Run Command On Controller ${ip} ${cmd} ${user} ${password} ${prompt}
574 Get Karaf Log Types From Test Start
575 [Arguments] ${ip} ${test_name} ${types} ${user}=${ODL_SYSTEM_USER} ${password}=${ODL_SYSTEM_PASSWORD} ${prompt}=${ODL_SYSTEM_PROMPT}
576 ... ${log_file}=${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log
577 : FOR ${type} IN @{types}
578 \ Get Karaf Log Type From Test Start ${ip} ${test_name} ${type} ${user} ${password}
579 \ ... ${prompt} ${log_file}
581 Get Karaf Log Events From Test Start
582 [Arguments] ${test_name} ${user}=${ODL_SYSTEM_USER} ${password}=${ODL_SYSTEM_PASSWORD} ${prompt}=${ODL_SYSTEM_PROMPT}
583 ${log_types} = Create List ERROR WARN Exception
584 Run Keyword If 0 < ${NUM_ODL_SYSTEM} Get Karaf Log Types From Test Start ${ODL_SYSTEM_IP} ${test_name} ${log_types}
585 Run Keyword If 1 < ${NUM_ODL_SYSTEM} Get Karaf Log Types From Test Start ${ODL_SYSTEM_2_IP} ${test_name} ${log_types}
586 Run Keyword If 2 < ${NUM_ODL_SYSTEM} Get Karaf Log Types From Test Start ${ODL_SYSTEM_3_IP} ${test_name} ${log_types}
588 Get ControlNode Connection
589 ${control_conn_id}= SSHLibrary.Open Connection ${OS_CONTROL_NODE_IP} prompt=${DEFAULT_LINUX_PROMPT_STRICT}
590 Utils.Flexible SSH Login ${OS_USER} ${DEVSTACK_SYSTEM_PASSWORD}
591 SSHLibrary.Set Client Configuration timeout=30s
592 Source Password force=yes
593 [Return] ${control_conn_id}
596 [Documentation] Get the OvsConfig and Flow entries from all Openstack nodes
597 Run Keyword If 0 < ${NUM_OS_SYSTEM} Get DumpFlows And Ovsconfig ${OS_CONTROL_NODE_IP}
598 Run Keyword If 1 < ${NUM_OS_SYSTEM} Get DumpFlows And Ovsconfig ${OS_COMPUTE_1_IP}
599 Run Keyword If 2 < ${NUM_OS_SYSTEM} Get DumpFlows And Ovsconfig ${OS_COMPUTE_2_IP}
601 Get Test Teardown Debugs
602 [Arguments] ${test_name}=${TEST_NAME}
604 Run Keyword And Ignore Error Get Model Dump ${HA_PROXY_IP}
605 Get Karaf Log Events From Test Start ${test_name}
607 Get Suite Teardown Debugs
609 Get Model Dump ${HA_PROXY_IP}
612 [Arguments] @{vm_indices}
613 [Documentation] Run these commands for debugging, it can list state of VM instances and ip information in control node
614 ${devstack_conn_id}= Get ControlNode Connection
615 Switch Connection ${devstack_conn_id}
616 ${output}= Write Commands Until Prompt sudo ip netns list
618 : FOR ${index} IN @{vm_indices}
619 \ ${output}= Write Commands Until Prompt nova show ${index} 30s
627 Create Security Group
628 [Arguments] ${sg_name} ${desc}
629 ${devstack_conn_id}= Get ControlNode Connection
630 Switch Connection ${devstack_conn_id}
631 ${output}= Write Commands Until Prompt nova secgroup-create ${sg_name} ${desc} 40s
635 [Arguments] ${direction} ${protocol} ${min_port} ${max_port} ${remote_ip} ${sg_name}
636 ${devstack_conn_id}= Get ControlNode Connection
637 Switch Connection ${devstack_conn_id}
638 ${output}= Write Commands Until Prompt neutron security-group-rule-create --direction ${direction} --protocol ${protocol} --port-range-min ${min_port} --port-range-max ${max_port} --remote-ip-prefix ${remote_ip} ${sg_name}
641 Neutron Security Group Show
642 [Arguments] ${SecurityGroupRuleName} ${additional_args}=${EMPTY}
643 [Documentation] Displays the neutron security group configurations that belongs to a given neutron security group name
644 ${devstack_conn_id}= Get ControlNode Connection
645 Switch Connection ${devstack_conn_id}
646 ${cmd}= Set Variable neutron security-group-show ${SecurityGroupRuleName} ${additional_args}
648 ${output}= Write Commands Until Prompt ${cmd} 30s
654 [Arguments] ${PortName} ${additional_args}=${EMPTY}
655 [Documentation] Display the port configuration that belong to a given neutron port
656 ${devstack_conn_id}= Get ControlNode Connection
657 Switch Connection ${devstack_conn_id}
658 ${cmd}= Set Variable neutron port-show ${PortName} ${additional_args}
660 ${output}= Write Commands Until Prompt ${cmd} 30s
665 Neutron Security Group Create
666 [Arguments] ${SecurityGroupName} ${additional_args}=${EMPTY}
667 [Documentation] Create a security group with specified name ,description & protocol value according to security group template
668 ${devstack_conn_id}= Get ControlNode Connection
669 Switch Connection ${devstack_conn_id}
670 ${cmd}= Set Variable neutron security-group-create ${SecurityGroupName} ${additional_args}
672 ${output}= Write Commands Until Prompt ${cmd} 30s
674 Should Contain ${output} Created a new security_group
675 ${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}
678 [Return] ${output} ${sgp_id}
680 Neutron Security Group Update
681 [Arguments] ${SecurityGroupName} ${additional_args}=${EMPTY}
682 [Documentation] Updating security groups
683 ${devstack_conn_id}= Get ControlNode Connection
684 Switch Connection ${devstack_conn_id}
685 ${cmd}= Set Variable neutron security-group-update ${SecurityGroupName} ${additional_args}
687 ${output}= Write Commands Until Prompt ${cmd} 30s
693 [Arguments] ${sg_name}
694 [Documentation] Delete Security group
695 ${devstack_conn_id}= Get ControlNode Connection
696 Switch Connection ${devstack_conn_id}
697 ${output}= Write Commands Until Prompt neutron security-group-delete ${sg_name} 40s
699 Should Match Regexp ${output} Deleted security_group: ${sg_name}|Deleted security_group\\(s\\): ${sg_name}
702 Neutron Security Group Rule Create
703 [Arguments] ${Security_group_name} &{Kwargs}
704 [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]} ..."
705 ${devstack_conn_id}= Get ControlNode Connection
706 Switch Connection ${devstack_conn_id}
707 Run Keyword If ${Kwargs} Log ${Kwargs}
708 ${description} Run Keyword If ${Kwargs} Pop From Dictionary ${Kwargs} description default=${None}
709 ${direction} Run Keyword If ${Kwargs} Pop From Dictionary ${Kwargs} direction default=${None}
710 ${ethertype} Run Keyword If ${Kwargs} Pop From Dictionary ${Kwargs} ethertype default=${None}
711 ${port_range_max} Run Keyword If ${Kwargs} Pop From Dictionary ${Kwargs} port_range_max default=${None}
712 ${port_range_min} Run Keyword If ${Kwargs} Pop From Dictionary ${Kwargs} port_range_min default=${None}
713 ${protocol} Run Keyword If ${Kwargs} Pop From Dictionary ${Kwargs} protocol default=${None}
714 ${remote_group_id} Run Keyword If ${Kwargs} Pop From Dictionary ${Kwargs} remote_group_id default=${None}
715 ${remote_ip_prefix} Run Keyword If ${Kwargs} Pop From Dictionary ${Kwargs} remote_ip_prefix default=${None}
716 ${cmd}= Set Variable neutron security-group-rule-create ${Security_group_name}
717 ${cmd}= Run Keyword If '${description}'!='None' Catenate ${cmd} --description ${description}
718 ... ELSE Catenate ${cmd}
719 ${cmd}= Run Keyword If '${direction}'!='None' Catenate ${cmd} --direction ${direction}
720 ... ELSE Catenate ${cmd}
721 ${cmd}= Run Keyword If '${ethertype}'!='None' Catenate ${cmd} --ethertype ${ethertype}
722 ... ELSE Catenate ${cmd}
723 ${cmd}= Run Keyword If '${port_range_max}'!='None' Catenate ${cmd} --port_range_max ${port_range_max}
724 ... ELSE Catenate ${cmd}
725 ${cmd}= Run Keyword If '${port_range_min}'!='None' Catenate ${cmd} --port_range_min ${port_range_min}
726 ... ELSE Catenate ${cmd}
727 ${cmd}= Run Keyword If '${protocol}'!='None' Catenate ${cmd} --protocol ${protocol}
728 ... ELSE Catenate ${cmd}
729 ${cmd}= Run Keyword If '${remote_group_id}'!='None' Catenate ${cmd} --remote_group_id ${remote_group_id}
730 ... ELSE Catenate ${cmd}
731 ${cmd}= Run Keyword If '${remote_ip_prefix}'!='None' Catenate ${cmd} --remote_ip_prefix ${remote_ip_prefix}
732 ... ELSE Catenate ${cmd}
733 ${output}= Write Commands Until Prompt ${cmd} 30s
734 ${rule_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}
736 Should Contain ${output} Created a new security_group_rule
738 [Return] ${output} ${rule_id}
740 Create Neutron Port With Additional Params
741 [Arguments] ${network_name} ${port_name} ${additional_args}=${EMPTY}
742 [Documentation] Create Port With given additional parameters
743 ${devstack_conn_id}= Get ControlNode Connection
744 Switch Connection ${devstack_conn_id}
745 ${cmd}= Set Variable neutron -v port-create ${network_name} --name ${port_name} ${additional_args}
747 ${OUTPUT}= Write Commands Until Prompt ${cmd} 30s
749 Should Contain ${output} Created a new port
750 ${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}
753 [Return] ${OUTPUT} ${port_id}
756 [Arguments] ${portName_list}
757 [Documentation] Retrieve the port MacAddr for the given list of port name and return the MAC address list.
758 ${devstack_conn_id}= Get ControlNode Connection
759 Switch Connection ${devstack_conn_id}
760 ${MacAddr-list} Create List
761 : FOR ${portName} IN @{portName_list}
762 \ ${macAddr}= OpenStackOperations.Get Port Mac ${portName} ${devstack_conn_id}
763 \ Append To List ${MacAddr-list} ${macAddr}
764 [Return] ${MacAddr-list}
767 [Arguments] ${port_name}
768 [Documentation] Keyword would return the IP of the ${port_name} received.
769 Switch Connection ${devstack_conn_id}
770 ${output}= Write Commands Until Prompt neutron port-list | grep "${port_name}" | awk '{print $11}' | awk -F "\\"" '{print $2}' 30s
772 ${splitted_output}= Split String ${output} ${EMPTY}
773 ${port_ip}= Get from List ${splitted_output} 0
778 [Arguments] ${port_name} ${conn_id}=${devstack_conn_id}
779 [Documentation] Keyword would return the MAC ID of the ${port_name} received.
780 Switch Connection ${conn_id}
781 ${output}= Write Commands Until Prompt neutron port-list | grep "${port_name}" | awk '{print $6}' 30s
783 ${splitted_output}= Split String ${output} ${EMPTY}
784 ${port_mac}= Get from List ${splitted_output} 0
789 [Arguments] ${bridge_name} ${intf_name} ${gw_name}
790 [Documentation] Keyword to create an L2 Gateway ${gw_name} for bridge ${bridge_name} connected to interface ${intf_name} (Using Neutron CLI).
791 Switch Connection ${devstack_conn_id}
792 ${l2gw_output}= Write Commands Until Prompt ${L2GW_CREATE} name=${bridge_name},interface_names=${intf_name} ${gw_name} 30s
794 [Return] ${l2gw_output}
796 Create L2Gateway Connection
797 [Arguments] ${gw_name} ${net_name}
798 [Documentation] Keyword would create a new L2 Gateway Connection for ${gw_name} to ${net_name} (Using Neutron CLI).
799 Switch Connection ${devstack_conn_id}
800 ${l2gw_output}= Write Commands Until Prompt ${L2GW_CONN_CREATE} ${gw_name} ${net_name} 30s
802 [Return] ${l2gw_output}
805 [Documentation] Keyword to return all the L2 Gateways available (Using Neutron CLI).
806 Switch Connection ${devstack_conn_id}
807 ${output}= Write Commands Until Prompt ${L2GW_GET_YAML} 30s
810 Get All L2Gateway Connection
811 [Documentation] Keyword to return all the L2 Gateway connections available (Using Neutron CLI).
812 Switch Connection ${devstack_conn_id}
813 ${output}= Write Commands Until Prompt ${L2GW_GET_CONN_YAML} 30s
818 [Documentation] Keyword to check if the ${gw_id} is available in the L2 Gateway list (Using Neutron CLI).
819 Switch Connection ${devstack_conn_id}
820 ${output}= Write Commands Until Prompt ${L2GW_SHOW} ${gw_id} 30s
825 [Arguments] ${l2gw_name}
826 [Documentation] Keyword to retrieve the L2 Gateway ID for the ${l2gw_name} (Using Neutron CLI).
827 Switch Connection ${devstack_conn_id}
828 ${output}= Write Commands Until Prompt ${L2GW_GET} | grep "${l2gw_name}" | awk '{print $2}' 30s
830 ${splitted_output}= Split String ${output} ${EMPTY}
831 ${l2gw_id}= Get from List ${splitted_output} 0
835 Get L2gw Connection Id
836 [Arguments] ${l2gw_name}
837 [Documentation] Keyword to retrieve the L2 Gateway Connection ID for the ${l2gw_name} (Using Neutron CLI).
838 Switch Connection ${devstack_conn_id}
839 ${l2gw_id}= OpenStackOperations.Get L2gw Id ${l2gw_name}
840 ${output}= Write Commands Until Prompt ${L2GW_GET_CONN} | grep "${l2gw_id}" | awk '{print $2}' 30s
842 ${splitted_output}= Split String ${output} ${EMPTY}
843 ${l2gw_conn_id}= Get from List ${splitted_output} 0
845 [Return] ${l2gw_conn_id}
847 Neutron Port List Rest
848 [Documentation] Keyword to get all ports details in Neutron (Using REST).
849 ${resp} = RequestsLibrary.Get Request session ${PORT_URL}
851 Should Be Equal As Strings ${resp.status_code} 200
852 [Return] ${resp.content}
854 Get Neutron Port Rest
855 [Arguments] ${port_id}
856 [Documentation] Keyword to get the specific port details in Neutron (Using REST).
857 ${resp} = RequestsLibrary.Get Request session ${CONFIG_API}/${GET_PORT_URL}/${port_id}
859 Should Be Equal As Strings ${resp.status_code} 200
860 [Return] ${resp.content}
863 [Arguments] ${port_id} ${json_data}
864 [Documentation] Keyword to update ${port_id} with json data received in ${json_data} (Using REST).
866 ${resp} = RequestsLibrary.Put Request session ${CONFIG_API}/${GET_PORT_URL}/${port_id} ${json_data}
868 Should Be Equal As Strings ${resp.status_code} 200
869 [Return] ${resp.content}
871 Create And Configure Security Group
872 [Arguments] ${sg-name}
873 Neutron Security Group Create ${sg-name}
874 Neutron Security Group Rule Create ${sg-name} direction=ingress port_range_max=65535 port_range_min=1 protocol=tcp remote_ip_prefix=0.0.0.0/0
875 Neutron Security Group Rule Create ${sg-name} direction=egress port_range_max=65535 port_range_min=1 protocol=tcp remote_ip_prefix=0.0.0.0/0
876 Neutron Security Group Rule Create ${sg-name} direction=ingress protocol=icmp remote_ip_prefix=0.0.0.0/0
877 Neutron Security Group Rule Create ${sg-name} direction=egress protocol=icmp remote_ip_prefix=0.0.0.0/0
878 Neutron Security Group Rule Create ${sg-name} direction=ingress port_range_max=65535 port_range_min=1 protocol=udp remote_ip_prefix=0.0.0.0/0
879 Neutron Security Group Rule Create ${sg-name} direction=egress port_range_max=65535 port_range_min=1 protocol=udp remote_ip_prefix=0.0.0.0/0
881 Create SFC Flow Classifier
882 [Arguments] ${name} ${src_ip} ${dest_ip} ${protocol} ${dest_port} ${neutron_src_port}
883 [Documentation] Create a flow classifier for SFC
884 ${devstack_conn_id}= Get ControlNode Connection
885 Switch Connection ${devstack_conn_id}
886 ${cmd}= Set Variable neutron 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}
888 ${output}= Write Commands Until Prompt ${cmd} 30s
891 Should Contain ${output} Created a new flow_classifier
894 Delete SFC Flow Classifier
896 [Documentation] Delete a SFC flow classifier
897 ${devstack_conn_id}= Get ControlNode Connection
898 Switch Connection ${devstack_conn_id}
899 ${cmd}= Set Variable neutron flow-classifier-delete ${name}
901 ${output}= Write Commands Until Prompt ${cmd} 30s
904 Should Contain ${output} Deleted flow_classifier
908 [Arguments] ${name} ${port_in} ${port_out}
909 [Documentation] Creates a neutron port pair for SFC
910 ${devstack_conn_id}= Get ControlNode Connection
911 Switch Connection ${devstack_conn_id}
912 ${cmd}= Set Variable neutron port-pair-create --ingress=${port_in} --egress=${port_out} ${name}
914 ${output}= Write Commands Until Prompt ${cmd} 30s
917 Should Contain ${output} Created a new port_pair
922 [Documentation] Delete a SFC port pair
923 ${devstack_conn_id}= Get ControlNode Connection
924 Switch Connection ${devstack_conn_id}
925 ${cmd}= Set Variable neutron port-pair-delete ${name}
927 ${output}= Write Commands Until Prompt ${cmd} 30s
930 Should Contain ${output} Deleted port_pair
933 Create SFC Port Pair Group
934 [Arguments] ${name} ${port_pair}
935 [Documentation] Creates a port pair group with a single port pair for SFC
936 ${devstack_conn_id}= Get ControlNode Connection
937 Switch Connection ${devstack_conn_id}
938 ${cmd}= Set Variable neutron port-pair-group-create --port-pair ${port_pair} ${name}
940 ${output}= Write Commands Until Prompt ${cmd} 30s
943 Should Contain ${output} Created a new port_pair_group
946 Create SFC Port Pair Group With Two Pairs
947 [Arguments] ${name} ${port_pair1} ${port_pair2}
948 [Documentation] Creates a port pair group with two port pairs for SFC
949 ${devstack_conn_id}= Get ControlNode Connection
950 Switch Connection ${devstack_conn_id}
951 ${cmd}= Set Variable neutron port-pair-group-create --port-pair ${port_pair1} --port-pair ${port_pair2} ${name}
953 ${output}= Write Commands Until Prompt ${cmd} 30s
956 Should Contain ${output} Created a new port_pair_group
959 Delete SFC Port Pair Group
961 [Documentation] Delete a SFC port pair group
962 ${devstack_conn_id}= Get ControlNode Connection
963 Switch Connection ${devstack_conn_id}
964 ${cmd}= Set Variable neutron port-pair-group-delete ${name}
966 ${output}= Write Commands Until Prompt ${cmd} 30s
969 Should Contain ${output} Deleted port_pair_group
972 Create SFC Port Chain
973 [Arguments] ${name} ${pg1} ${pg2} ${fc}
974 [Documentation] Creates a port pair chain with two port groups and a singel classifier.
975 ${devstack_conn_id}= Get ControlNode Connection
976 Switch Connection ${devstack_conn_id}
977 ${cmd}= Set Variable neutron port-chain-create --port-pair-group ${pg1} --port-pair-group ${pg2} --flow-classifier ${fc} ${name}
979 ${output}= Write Commands Until Prompt ${cmd} 30s
982 Should Contain ${output} Created a new port_chain
985 Delete SFC Port Chain
987 [Documentation] Delete a SFC port chain
988 ${devstack_conn_id}= Get ControlNode Connection
989 Switch Connection ${devstack_conn_id}
990 ${cmd}= Set Variable neutron port-chain-delete ${name}
992 ${output}= Write Commands Until Prompt ${cmd} 30s
995 Should Contain ${output} Deleted port_chain