Use openstack CLI for router delete 39/78239/6
authorJamo Luhrsen <jluhrsen@redhat.com>
Wed, 28 Nov 2018 01:27:36 +0000 (17:27 -0800)
committerSam Hague <shague@redhat.com>
Wed, 28 Nov 2018 21:00:20 +0000 (21:00 +0000)
the neutron cli is deprecated and would live to stop
maintaining it. Also, the apex jobs that are coming
online don't have the neutron cli installed by default.

Change-Id: Ib3daf3ef79e6609cac30b4c54d7a93a9fc18a2c8
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/suites/netvirt/vpnservice/vpn_basic.robot
csit/suites/netvirt/vpnservice/vpn_basic_ipv6.robot

index a2c042108949c753cbe2f0dc410029ea8066fca8..3bd138f109ff0fc3c6d1869298c7f6cd682b6d1f 100644 (file)
@@ -196,8 +196,11 @@ Delete Router
 
 Delete Router With NonExistentRouter Name
     [Documentation]    Delete router with nonExistentRouter name
-    ${rc}    ${output} =    Run And Return Rc And Output    neutron router-delete nonExistentRouter
-    BuiltIn.Should Match Regexp    ${output}    Unable Not At URIto find router with name or id 'nonExistentRouter'|Unable to find router\\(s\\) with id\\(s\\) 'nonExistentRouter'
+    ${result} =    Process.Run Process    openstack router delete nonExistentRouter    shell=True
+    BuiltIn.Log    ${result.stdout}
+    BuiltIn.Log    ${result.stderr}
+    BuiltIn.Should Be True    '${result.rc}' == '1'
+    BuiltIn.Should Match Regexp    ${result.stderr}    Failed to delete router with name or ID 'nonExistentRouter': No Router found for nonExistentRouter
 
 Associate Networks To L3VPN
     [Documentation]    Associates L3VPN to networks and verify
index 96cb6a91009278a27826da7ec2148d41db483b8b..588ba0bee9ff9c68e241d29798a9d2e6e702a8ed 100644 (file)
@@ -154,8 +154,11 @@ Delete Router And Router Interfaces With L3VPN
     Verify GWMAC Flow Entry Removed From Flow Table On All Compute Nodes
 
 Delete Router With NonExistentRouter Name
-    ${rc}    ${output}=    Run And Return Rc And Output    neutron router-delete nonExistentRouter
-    BuiltIn.Should Match Regexp    ${output}    Unable to find router with name or id 'nonExistentRouter'|Unable to find router\\(s\\) with id\\(s\\) 'nonExistentRouter'
+    ${result} =    Process.Run Process    openstack router delete nonExistentRouter    shell=True
+    BuiltIn.Log    ${result.stdout}
+    BuiltIn.Log    ${result.stderr}
+    BuiltIn.Should Be True    '${result.rc}' == '1'
+    BuiltIn.Should Match Regexp    ${result.stderr}    Failed to delete router with name or ID 'nonExistentRouter': No Router found for nonExistentRouter
 
 Associate L3VPN To Networks
     ${network1_id} =    OpenStackOperations.Get Net Id    @{NETWORKS}[0]