Migrate to Openstack CLI
[integration/test.git] / csit / suites / openstack / extensions / sfc.robot
index 8f9fd9ff782893f8977ac6a1ead7e028ff2797fd..51fd0c5380cdafda8369b19a5bfbf1051c419ed2 100644 (file)
@@ -34,12 +34,12 @@ Create Subnets For network_1
 Add Allow All Rules
     [Documentation]    Allow all packets for this suite
     Neutron Security Group Create    sg-sfc
-    Neutron Security Group Rule Create    sg-sfc    direction=ingress    port_range_max=65535    port_range_min=1    protocol=tcp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=egress    port_range_max=65535    port_range_min=1    protocol=tcp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=ingress    port_range_max=65535    port_range_min=1    protocol=udp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=egress    port_range_max=65535    port_range_min=1    protocol=udp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=ingress    protocol=icmp    remote_ip_prefix=0.0.0.0/0
-    Neutron Security Group Rule Create    sg-sfc    direction=egress    protocol=icmp    remote_ip_prefix=0.0.0.0/0
+    Neutron Security Group Rule Create    sg-sfc    direction=ingress    port_range_max=65535    port_range_min=1    protocol=tcp
+    Neutron Security Group Rule Create    sg-sfc    direction=egress    port_range_max=65535    port_range_min=1    protocol=tcp
+    Neutron Security Group Rule Create    sg-sfc    direction=ingress    port_range_max=65535    port_range_min=1    protocol=udp
+    Neutron Security Group Rule Create    sg-sfc    direction=egress    port_range_max=65535    port_range_min=1    protocol=udp
+    Neutron Security Group Rule Create    sg-sfc    direction=ingress    protocol=icmp
+    Neutron Security Group Rule Create    sg-sfc    direction=egress    protocol=icmp
 
 Create Neutron Ports
     [Documentation]    Precreate neutron ports to be used for SFC VMs
@@ -98,7 +98,7 @@ Create Port Chain
 
 Start Web Server On Destination VM
     [Documentation]    Start a simple web server on the destination VM
-    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[4]    while true; do echo -e "HTTP/1.0 200 OK\r\n\r\nWelcome to $(hostname)" | sudo nc -l -p 80 ; done&
+    Execute Command on VM Instance    @{NETWORKS_NAME}[0]    @{NET1_VM_IPS}[4]    while true; do echo -e "HTTP/1.0 200 OK\r\nContent-Length: 21\r\n\r\nWelcome to web-server" | sudo nc -l -p 80 ; done &
 
 Add Static Routing On Service Function VMs
     [Documentation]    Enable eth1 and add static routing between the ports on the SF VMs
@@ -132,6 +132,11 @@ Delete All SFC Objects
     Delete SFC Port Pair    PP3
     Delete SFC Flow Classifier    FC_http
 
+Delete Neutron Ports
+    [Documentation]    Delete neutron ports that were used for SFC VMs
+    : FOR    ${port}    IN    @{PORTS}
+    \    Delete Port    ${port}
+
 Delete Sub Networks In network_1
     [Documentation]    Delete Sub Nets for the Networks with neutron request.
     Delete SubNet    l2_subnet_1