Fix bgpcep-1node-userfeatures tests
[integration/test.git] / csit / suites / bgpcep / pcepuser / pcepuser.robot
index 089190d30aa036c59183de2d581d408bab16aef7..6e15be212506a56df06e2fcd20222272362bf9b5 100644 (file)
@@ -1,8 +1,8 @@
 *** Settings ***
 Documentation     Basic tests for odl-bgpcep-pcep-all feature.
-...           
+...
 ...               Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
-...           
+...
 ...               This program and the accompanying materials are made available under the
 ...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -19,12 +19,12 @@ Resource          ../../../libraries/RemoteBash.robot
 Resource          ../../../libraries/TemplatedRequests.robot
 Resource          ../../../libraries/CompareStream.robot
 Resource          ../../../variables/Variables.robot
-Variables         ../../../variables/pcepuser/variables.py    ${TOOLS_SYSTEM_IP}
+Variables         ../../../variables/pcepuser/${ODL_STREAM}/variables.py    ${TOOLS_SYSTEM_IP}
 
 *** Variables ***
 ${CONFIG_SESSION}    session
-${PATH_SESSION_URI}    node/pcc:%2F%2F${TOOLS_SYSTEM_IP}/path-computation-client
-${PCEP_VARIABLES_FOLDER}    ${CURDIR}/../../../variables/pcepuser/
+${PATH_SESSION_URI}    node=pcc:%2F%2F${TOOLS_SYSTEM_IP}/network-topology-pcep:path-computation-client
+${PCEP_VARIABLES_FOLDER}    ${CURDIR}/../../../variables/pcepuser/${ODL_STREAM}
 
 *** Test Cases ***
 Topology_Precondition
@@ -145,6 +145,8 @@ Compare_Topology
     ...    Error codes and normalized jsons should match exactly.
     # TODO: Add Node Session State Check For Oxygen, see tcpmd5user
     # TODO: Possibly remake all tests with TemplatedRequests
-    ${response}=    RequestsLibrary.Get Request    ${CONFIG_SESSION}    ${OPERATIONAL_TOPO_API}/topology/pcep-topology/${uri}
+    ${topology_uri}=    BuiltIn.Set_Variable_If    '${uri}'=='${EMPTY}'
+    ...    ${REST_API}/${TOPOLOGY_URL}=pcep-topology?content=nonconfig    ${REST_API}/${TOPOLOGY_URL}=pcep-topology/${uri}?content=nonconfig
+    ${response}=    RequestsLibrary.Get Request    ${CONFIG_SESSION}    ${topology_uri}
     BuiltIn.Should_Be_Equal_As_Strings    ${response.status_code}    200
     TemplatedRequests.Normalize_Jsons_And_Compare    ${exp}    ${response.text}