X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Fsuites%2Fbgpcep%2Ftcpmd5user%2Ftcpmd5user.robot;h=8c92b18d80ce51cc9b1a257e183d31ede8e80f13;hb=63342e0454b82783a6ef7a9b19e1698b9b5cd621;hp=5b8e79cb154001b17410e172e5eaf2cae13a014e;hpb=7c13b523bb71e2e2204e5f0875ec998b925a19b4;p=integration%2Ftest.git diff --git a/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot b/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot index 5b8e79cb15..8c92b18d80 100644 --- a/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot +++ b/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot @@ -21,10 +21,11 @@ Library String Library ${CURDIR}/../../../libraries/HsfJson/hsf_json.py Resource ${CURDIR}/../../../libraries/ConfigViaRestconf.robot Resource ${CURDIR}/../../../libraries/FailFast.robot +Resource ${CURDIR}/../../../libraries/NexusKeywords.robot Resource ${CURDIR}/../../../libraries/PcepOperations.robot Resource ${CURDIR}/../../../libraries/WaitForFailure.robot Variables ${CURDIR}/../../../variables/Variables.py -Variables ${CURDIR}/../../../variables/pcepuser/variables.py ${MININET} +Variables ${CURDIR}/../../../variables/pcepuser/variables.py ${TOOLS_SYSTEM_IP} *** Variables *** ${directory_for_actual_responses} ${TEMPDIR}${/}actual @@ -40,7 +41,7 @@ Topology_Precondition Start_Secure_Pcc_Mock [Documentation] Execute pcc-mock on Mininet with password set, fail if pcc-mock promptly exits. Keep pcc-mock running for next test cases. - ${command}= BuiltIn.Set_Variable java -jar ${filename} --password topsecret --reconnect 1 --local-address ${MININET} --remote-address ${CONTROLLER} 2>&1 | tee pccmock.log + ${command}= NexusKeywords.Compose_Full_Java_Command -jar ${filename} --password topsecret --reconnect 1 --local-address ${TOOLS_SYSTEM_IP} --remote-address ${ODL_SYSTEM_IP} 2>&1 | tee pccmock.log BuiltIn.Log ${command} SSHLibrary.Write ${command} Read_And_Fail_If_Prompt_Is_Seen @@ -155,24 +156,14 @@ Set_It_Up [Documentation] Create SSH session to Mininet machine, prepare HTTP client session to Controller. ... Figure out latest pcc-mock version and download it from Nexus to Mininet. ... Also, delete and create directories for json diff handling. - SSHLibrary.Open_Connection ${MININET} - SSHLibrary.Login_With_Public_Key ${MININET_USER} ${USER_HOME}/.ssh/${SSH_KEY} any + NexusKeywords.Initialize_Artifact_Deployment_And_Usage ${current_connection}= SSHLibrary.Get_Connection ${current_prompt}= BuiltIn.Set_Variable ${current_connection.prompt} BuiltIn.Log ${current_prompt} BuiltIn.Set_Suite_Variable ${prompt} ${current_prompt} - RequestsLibrary.Create_Session ses http://${CONTROLLER}:${RESTCONFPORT}${OPERATIONAL_TOPO_API} auth=${AUTH} - # TODO: See corresponding bgpuser TODO. - ${urlbase}= BuiltIn.Set_Variable ${NEXUSURL_PREFIX}/content/repositories/opendaylight.snapshot/org/opendaylight/bgpcep/pcep-pcc-mock - ${version}= SSHLibrary.Execute_Command curl ${urlbase}/maven-metadata.xml | grep latest | cut -d '>' -f 2 | cut -d '<' -f 1 - # TODO: Use RequestsLibrary and String instead of curl and bash utilities? - BuiltIn.Log ${version} - ${namepart}= SSHLibrary.Execute_Command curl ${urlbase}/${version}/maven-metadata.xml | grep value | head -n 1 | cut -d '>' -f 2 | cut -d '<' -f 1 - BuiltIn.Log ${namepart} - BuiltIn.Set_Suite_Variable ${filename} pcep-pcc-mock-${namepart}-executable.jar - BuiltIn.Log ${filename} - ${response}= SSHLibrary.Execute_Command wget -q -N ${urlbase}/${version}/${filename} 2>&1 - BuiltIn.Log ${response} + RequestsLibrary.Create_Session ses http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API} auth=${AUTH} + ${name}= NexusKeywords.Deploy_Test_Tool bgpcep pcep-pcc-mock + BuiltIn.Set_Suite_Variable ${filename} ${name} OperatingSystem.Remove_Directory ${directory_for_expected_responses} recursive=True OperatingSystem.Remove_Directory ${directory_for_actual_responses} recursive=True # The previous suite may have been using the same directories. @@ -234,6 +225,6 @@ Construct_Password_Element_Line_Using_Password Replace_Password_Xml_Element_In_Pcep_Client_Module [Arguments] ${password_element} [Documentation] Send restconf PUT to replace the config module specifying PCEP password element (may me empty=missing). - ${mapping_as_string}= BuiltIn.Set_Variable {'IP': '${MININET}', 'PASSWD': '''${password_element}'''} + ${mapping_as_string}= BuiltIn.Set_Variable {'IP': '${TOOLS_SYSTEM_IP}', 'PASSWD': '''${password_element}'''} BuiltIn.Log ${mapping_as_string} ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${directory_with_template_folders}${/}pcep_topology_client_module ${mapping_as_string}