Edited suites to use norm_json.py instead of HsfJson
[integration/test.git] / csit / suites / bgpcep / pcepuser / pcepuser.robot
index c1d37b19a5eb38e631c43bcd4db951f25a634ce2..f95b29e7cfd16b5ed90b6aee44f636269841cd61 100644 (file)
@@ -11,15 +11,14 @@ Suite Teardown    Tear_It_Down
 Library           OperatingSystem
 Library           SSHLibrary
 Library           RequestsLibrary
-Library           ${CURDIR}/../../../libraries/HsfJson/hsf_json.py
+Library           ${CURDIR}/../../../libraries/norm_json.py
 Resource          ${CURDIR}/../../../libraries/NexusKeywords.robot
 Resource          ${CURDIR}/../../../libraries/PcepOperations.robot
 Resource          ${CURDIR}/../../../libraries/Utils.robot
 Variables         ${CURDIR}/../../../variables/Variables.py
-Variables         ${CURDIR}/../../../variables/pcepuser/variables.py    ${MININET}
+Variables         ${CURDIR}/../../../variables/pcepuser/variables.py    ${TOOLS_SYSTEM_IP}
 
 *** Variables ***
-${MININET_PROMPT}    ${DEFAULT_LINUX_PROMPT}
 ${OUTPUT_TIMEOUT}    10
 # FIXME: Unify parameter naming and case.
 ${ExpDir}         ${CURDIR}/expected
@@ -34,7 +33,7 @@ Topology_Precondition
 
 Start_Pcc_Mock
     [Documentation]    Execute pcc-mock on Mininet, fail is Open is not sent, keep it running for next tests.
-    ${command}=    NexusKeywords.Compose_Full_Java_Command    -jar ${filename} --local-address ${MININET} --remote-address ${CONTROLLER} 2>&1 | tee pccmock.log
+    ${command}=    NexusKeywords.Compose_Full_Java_Command    -jar ${filename} --local-address ${TOOLS_SYSTEM_IP} --remote-address ${ODL_SYSTEM_IP} 2>&1 | tee pccmock.log
     Log    ${command}
     Write    ${command}
     Read_Until    started, sent proposal Open
@@ -120,7 +119,7 @@ Set_It_Up
     ...    Also, delete and create directories for json diff handling.
     NexusKeywords.Initialize_Artifact_Deployment_And_Usage
     # FIXME: Unify Module prefix usage across whole file.
-    Create_Session    ses    http://${CONTROLLER}:${RESTCONFPORT}/restconf/operational/network-topology:network-topology    auth=${AUTH}
+    Create_Session    ses    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}/restconf/operational/network-topology:network-topology    auth=${AUTH}
     ${name}=    NexusKeywords.Deploy_Test_Tool    bgpcep    pcep-pcc-mock
     BuiltIn.Set_Suite_Variable    ${filename}    ${name}
     Remove_Directory    ${ExpDir}
@@ -134,13 +133,13 @@ Compare_Topology
     [Documentation]    Get current pcep-topology as json, normalize both expected and actual json.
     ...    Save normalized jsons to files for later processing.
     ...    Error codes and normalized jsons should match exactly.
-    ${normexp}=    Hsf_Json    ${expected}
+    ${normexp}=    norm_json.normalize_json_text    ${expected}
     Log    ${normexp}
     Create_File    ${ExpDir}${/}${name}    ${normexp}
     ${resp}=    RequestsLibrary.Get Request    ses    topology/pcep-topology
     Log    ${resp}
     Log    ${resp.text}
-    ${normresp}=    Hsf_Json    ${resp.text}
+    ${normresp}=    norm_json.normalize_json_text    ${resp.text}
     Log    ${normresp}
     Create_File    ${ActDir}${/}${name}    ${normresp}
     Should_Be_Equal_As_Strings    ${resp.status_code}    200