Use openstack CLI for router delete
[integration/test.git] / csit / suites / netvirt / vpnservice / vpn_basic_ipv6.robot
index b82f8311231930ab8be70c08eb24fb59a00478ea..588ba0bee9ff9c68e241d29798a9d2e6e702a8ed 100644 (file)
@@ -148,14 +148,17 @@ Delete Router And Router Interfaces With L3VPN
     ${router_output} =    OpenStackOperations.List Routers
     BuiltIn.Should Not Contain    ${router_output}    ${ROUTER}
     @{router_list} =    BuiltIn.Create List    ${ROUTER}
-    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements Not At URI    ${ROUTER_URL}    ${router_list}
+    BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements Not At URI    ${ROUTER_URL}    ${router_list}    check_for_null=True
     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
     BuiltIn.Should Not Contain    ${resp}    ${router_id}
     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]