Tidied updated tests.
[integration/test.git] / csit / suites / groupbasedpolicy / GBPSFC / 6-node / demo-symmetric-chain / 998_clean_odl.robot
index dc95ff9eb8eb9522fe498fbe40548e740c1ead97..fe4f6789854c6b1cbf5a01588761e488bb613d93 100644 (file)
@@ -9,26 +9,9 @@ Library           json
 Variables         ../../../../../variables/Variables.py
 Resource          ../../../../../libraries/Utils.robot
 Resource          ../../../../../libraries/GBP/RestconfUtils.robot
-
-*** Variables ***
-
-${GBP_TENENT_ID}           f5c7d344-d1c7-4208-8531-2c2693657e12
-${TENANT_PATH}             /restconf/config/policy:tenants/tenant/${GBP_TENENT_ID}
-${TUNNELS_PATH}            /restconf/config/opendaylight-inventory:nodes
-
-${OPER_ENDPOINTS_PATH}     /restconf/operational/endpoint:endpoints
-${UNREG_ENDPOINTS_PATH}    /restconf/operations/endpoint:unregister-endpoint
-
-${SF_PATH}                 /restconf/config/service-function:service-functions
-${SFF_PATH}                /restconf/config/service-function-forwarder:service-function-forwarders
-${SFC_PATH}                /restconf/config/service-function-chain:service-function-chains
-${SFP_PATH}                /restconf/config/service-function-path:service-function-paths
-
-${OPER_NODES}              /restconf/operational/opendaylight-inventory:nodes/
-
+Resource          ../Variables.robot
 
 *** Test Cases ***
-
 Delete Service Function Paths
     [Documentation]    Delete Service Function Paths from ODL
     [Tags]    GBPSFCTEAR
@@ -62,4 +45,10 @@ Delete Tenant
 Unregister Endpoints
     [Documentation]    Unregister Endpoints Endpoints from ODL
     [Tags]    GBPSFCTEAR
-    Unregister Endpoints    ${OPER_ENDPOINTS_PATH}
+    RestconfUtils.Unregister Endpoints
+
+Delete OVSDB Topology If Present
+    [Documentation]    Delete OVSDB topology from ODL
+    [Tags]    GBPSFCTEAR
+    ${resp}    RequestsLibrary.Get Request    session    ${TOPOLOGY_PATH}
+    Run Keyword If    ${resp.status_code} == 200    Remove All Elements At URI And Verify    ${TOPOLOGY_PATH}