Fix bgpcep-1node-userfeatures tests
[integration/test.git] / csit / libraries / PcepOperations.robot
index 23b8c628afbb9b69955eafeac5c797276cec30be..43f3a73ed24b3cea4e4f6dde5666f667d381880e 100644 (file)
@@ -21,7 +21,7 @@ ${PCEP_VAR_FOLDER}    ${CURDIR}/../variables/tcpmd5user
 Setup_Pcep_Operations
     [Documentation]    Creates Requests session to be used by subsequent keywords.
     # Do not append slash at the end uf URL, Requests would add another, resulting in error.
-    Create_Session    pcep_session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}/restconf/operations    headers=${HEADERS_XML}    auth=${AUTH}
+    Create_Session    pcep_session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}/rests/operations    headers=${HEADERS_XML}    auth=${AUTH}
 
 Teardown_Pcep_Operations
     [Documentation]    Teardown to pair with Setup (otherwise no-op).
@@ -54,7 +54,7 @@ Operate_Xml_Lsp_Return_Json
     [Documentation]    Post XML data to given pcep-operations URI, check status_code is 200 and return response text (JSON).
     ${response}=    RequestsLibrary.Post Request    pcep_session    ${uri_part}    data=${xml_data}
     Log    ${xml_data}
-    Should_Be_Equal_As_Strings    ${response.status_code}    200
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${response.status_code}
     [Return]    ${response.text}
 
 Pcep_Json_Is_Success
@@ -65,7 +65,7 @@ Pcep_Json_Is_Success
 Pcep_Json_Is_Refused
     [Arguments]    ${actual_raw}
     [Documentation]    Given text should be equal to json response when device refuses tunnel removal.
-    ${expected_raw}=    BuiltIn.Set_Variable    {"output":{"error":[{"error-object":{"ignore":false,"processing-rule":false,"type":19,"value":9}}],"failure":"failed"}}
+    ${expected_raw}=    BuiltIn.Set_Variable    {"network-topology-pcep:output":{"error":[{"error-object":{"ignore":false,"processing-rule":false,"type":19,"value":9}}],"failure":"failed"}}
     # TODO: Is that JSON worth referencing pcepuser variables from this library?
     ${expected_normalized}=    norm_json.normalize_json_text    ${expected_raw}
     ${actual_normalized}=    norm_json.normalize_json_text    ${actual_raw}