Use openstack CLI for router delete
[integration/test.git] / csit / suites / netvirt / vpnservice / vpn_basic.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