-... 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
+... 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
-... Test suite performs basic pcep md5 password authorization test cases:
-... (Run entire basic PCEP suite without passwords.)
-... Start pcc-mock (reconnecting mode): 1 pcc, 1 lsp, password set, check pcep-topology stays empty.
-... Use restconf to change PCEP configuration to use a wrong password, check pcep-topology stays empty.
-... Change ODL PCEP configuration to use the correct password, check pcep-topology shows the lsp.
-... Stop pcc-mock, check pcep-topology stays empty.
-... Start pcc-mock with new password, check pcep-topology stays empty.
-... Change ODL PCEP configuration to use the correct password, check pcep-topology shows the lsp.
-... Update the lsp, check a change in pcep-topology.
-... Change ODL PCEP configuration to not use password, pcep-topology empties, kill pcep-pcc-mock.
+... Test suite performs basic pcep md5 password authorization test cases:
+... (Run entire basic PCEP suite without passwords.)
+... Start pcc-mock (reconnecting mode): 1 pcc, 1 lsp, password set, check pcep-topology stays empty.
+... Use restconf to change PCEP configuration to use a wrong password, check pcep-topology stays empty.
+... Change ODL PCEP configuration to use the correct password, check pcep-topology shows the lsp.
+... Stop pcc-mock, check pcep-topology stays empty.
+... Start pcc-mock with new password, check pcep-topology stays empty.
+... Change ODL PCEP configuration to use the correct password, check pcep-topology shows the lsp.
+... Update the lsp, check a change in pcep-topology.
+... Change ODL PCEP configuration to not use password, pcep-topology empties, kill pcep-pcc-mock.
-... Test cases no longer need netconf-connector-ssh, and they include comparison of
-... pcep-session-state.
-Suite Setup Set_It_Up
-Suite Teardown Tear_It_Down
-Test Setup FailFast.Fail_This_Fast_On_Previous_Error
-Test Teardown FailFast.Start_Failing_Fast_If_This_Failed
-Library OperatingSystem
-Library RequestsLibrary
-Library SSHLibrary prompt=]>
-Resource ../../../libraries/CompareStream.robot
-Resource ../../../libraries/FailFast.robot
-Resource ../../../libraries/KarafKeywords.robot
-Resource ../../../libraries/NexusKeywords.robot
-Resource ../../../libraries/TemplatedRequests.robot
-Resource ../../../libraries/RemoteBash.robot
-Resource ../../../libraries/WaitForFailure.robot
-Resource ../../../variables/Variables.robot
-Variables ../../../variables/tcpmd5user/${ODL_STREAM}/variables.py ${TOOLS_SYSTEM_IP}
+... Test cases no longer need netconf-connector-ssh, and they include comparison of
+... pcep-session-state.
+
+Library OperatingSystem
+Library RequestsLibrary
+Library SSHLibrary prompt=]>
+Resource ../../../libraries/CompareStream.robot
+Resource ../../../libraries/FailFast.robot
+Resource ../../../libraries/KarafKeywords.robot
+Resource ../../../libraries/NexusKeywords.robot
+Resource ../../../libraries/TemplatedRequests.robot
+Resource ../../../libraries/RemoteBash.robot
+Resource ../../../libraries/WaitForFailure.robot
+Resource ../../../variables/Variables.robot
+Variables ../../../variables/tcpmd5user/${ODL_STREAM}/variables.py ${TOOLS_SYSTEM_IP}
+
+Suite Setup Set_It_Up
+Suite Teardown Tear_It_Down
+Test Setup FailFast.Fail_This_Fast_On_Previous_Error
+Test Teardown FailFast.Start_Failing_Fast_If_This_Failed
+
-${DIR_WITH_TEMPLATES} ${CURDIR}/../../../variables/tcpmd5user/${ODL_STREAM}
-${CONFIG_SESSION} session
-${OLD_ERROR_ARGS} \n"last-received-error": {},\n"last-sent-error": {},
-${NEW_ERROR_ARGS} ${EMPTY}
+${DIR_WITH_TEMPLATES} ${CURDIR}/../../../variables/tcpmd5user/${ODL_STREAM}
+${CONFIG_SESSION} session
+${OLD_ERROR_ARGS} \n"last-received-error": {},\n"last-sent-error": {},
+${NEW_ERROR_ARGS} ${EMPTY}
+
*** Test Cases ***
Topology_Precondition
[Documentation] Compare current pcep-topology to empty one.
... Timeout is long enough to see that pcep is ready, with no PCC connected.
[Tags] critical
*** Test Cases ***
Topology_Precondition
[Documentation] Compare current pcep-topology to empty one.
... Timeout is long enough to see that pcep is ready, with no PCC connected.
[Tags] critical
- BuiltIn.Wait_Until_Keyword_Succeeds 300s 1s TemplatedRequests.Get_As_Json_Templated ${DIR_WITH_TEMPLATES}${/}default_off session=${CONFIG_SESSION} verify=True
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 300s
+ ... 1s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... ${DIR_WITH_TEMPLATES}${/}default_off
+ ... session=${CONFIG_SESSION}
+ ... verify=True
- &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} CODE=${pcc_name_code} NAME=${pcc_name} IP_ODL=${ODL_SYSTEM_IP} ERRORS=${ERROR_ARGS}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 1s TemplatedRequests.Get_As_Json_Templated ${DIR_WITH_TEMPLATES}${/}default_on_state ${mapping} ${CONFIG_SESSION}
+ &{mapping} BuiltIn.Create_Dictionary
+ ... IP=${TOOLS_SYSTEM_IP}
+ ... CODE=${pcc_name_code}
+ ... NAME=${pcc_name}
+ ... IP_ODL=${ODL_SYSTEM_IP}
+ ... ERRORS=${ERROR_ARGS}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 1s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... ${DIR_WITH_TEMPLATES}${/}default_on_state
+ ... ${mapping}
+ ... ${CONFIG_SESSION}
Topology_Intercondition_2
[Documentation] Compare pcep-topology/path-computation-client to filled one, which includes a tunnel from pcc-mock.
Topology_Intercondition_2
[Documentation] Compare pcep-topology/path-computation-client to filled one, which includes a tunnel from pcc-mock.
- &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} CODE=${pcc_name_code} NAME=${pcc_name} IP_ODL=${ODL_SYSTEM_IP} ERRORS=${ERROR_ARGS}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 1s TemplatedRequests.Get_As_Json_Templated ${DIR_WITH_TEMPLATES}${/}default_on_state ${mapping} ${CONFIG_SESSION}
+ &{mapping} BuiltIn.Create_Dictionary
+ ... IP=${TOOLS_SYSTEM_IP}
+ ... CODE=${pcc_name_code}
+ ... NAME=${pcc_name}
+ ... IP_ODL=${ODL_SYSTEM_IP}
+ ... ERRORS=${ERROR_ARGS}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 1s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... ${DIR_WITH_TEMPLATES}${/}default_on_state
+ ... ${mapping}
+ ... ${CONFIG_SESSION}
... verify=True
Update_Delegated
[Documentation] Perform update-lsp on the mocked tunnel, check response is success.
&{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} NAME=${pcc_name}
... verify=True
Update_Delegated
[Documentation] Perform update-lsp on the mocked tunnel, check response is success.
&{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} NAME=${pcc_name}
- &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} CODE=${pcc_name_code} NAME=${pcc_name} IP_ODL=${ODL_SYSTEM_IP} ERRORS=${ERROR_ARGS}
- BuiltIn.Wait_Until_Keyword_Succeeds 30s 1s TemplatedRequests.Get_As_Json_Templated ${DIR_WITH_TEMPLATES}${/}default_on_updated_state ${mapping} ${CONFIG_SESSION}
+ &{mapping} BuiltIn.Create_Dictionary
+ ... IP=${TOOLS_SYSTEM_IP}
+ ... CODE=${pcc_name_code}
+ ... NAME=${pcc_name}
+ ... IP_ODL=${ODL_SYSTEM_IP}
+ ... ERRORS=${ERROR_ARGS}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 30s
+ ... 1s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... ${DIR_WITH_TEMPLATES}${/}default_on_updated_state
+ ... ${mapping}
+ ... ${CONFIG_SESSION}
&{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP}
TemplatedRequests.Delete_Templated ${DIR_WITH_TEMPLATES}${/}pcep_topology_node ${mapping}
&{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP}
TemplatedRequests.Delete_Templated ${DIR_WITH_TEMPLATES}${/}pcep_topology_node ${mapping}
KarafKeywords.Setup_Karaf_Keywords
TemplatedRequests.Create_Default_Session
NexusKeywords.Initialize_Artifact_Deployment_And_Usage
KarafKeywords.Setup_Karaf_Keywords
TemplatedRequests.Create_Default_Session
NexusKeywords.Initialize_Artifact_Deployment_And_Usage
- ${current_connection}= SSHLibrary.Get_Connection
- ${current_prompt}= BuiltIn.Set_Variable ${current_connection.prompt}
+ ${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 ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH}
BuiltIn.Log ${current_prompt}
BuiltIn.Set_Suite_Variable ${prompt} ${current_prompt}
RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH}
BuiltIn.Set_Suite_Variable ${filename} ${name}
#Setting Pcc Name and its code for mapping for templates
FailFast.Do_Not_Fail_Fast_From_Now_On
BuiltIn.Set_Suite_Variable ${filename} ${name}
#Setting Pcc Name and its code for mapping for templates
FailFast.Do_Not_Fail_Fast_From_Now_On
... Compute and Log the diff between expected and actual normalized responses.
... Close both HTTP client session and SSH connection to Mininet.
SSHLibrary.Get_File pccmock.log
... Compute and Log the diff between expected and actual normalized responses.
... Close both HTTP client session and SSH connection to Mininet.
SSHLibrary.Get_File pccmock.log
BuiltIn.Log ${pccmocklog}
RequestsLibrary.Delete_All_Sessions
SSHLibrary.Close_All_Connections
Test_Unauthorized
[Documentation] Try to access pcep topology with wrong password, should get empty topology
BuiltIn.Log ${pccmocklog}
RequestsLibrary.Delete_All_Sessions
SSHLibrary.Close_All_Connections
Test_Unauthorized
[Documentation] Try to access pcep topology with wrong password, should get empty topology
- TemplatedRequests.Get_As_Json_Templated ${DIR_WITH_TEMPLATES}${/}default_off session=${CONFIG_SESSION} verify=True
+ TemplatedRequests.Get_As_Json_Templated
+ ... ${DIR_WITH_TEMPLATES}${/}default_off
+ ... session=${CONFIG_SESSION}
+ ... verify=True
Read_Text_Before_Prompt
[Documentation] Log text gathered by SSHLibrary.Read_Until_Prompt.
... This needs to be a separate keyword just because how Read_And_Fail_If_Prompt_Is_Seen is implemented.
Read_Text_Before_Prompt
[Documentation] Log text gathered by SSHLibrary.Read_Until_Prompt.
... This needs to be a separate keyword just because how Read_And_Fail_If_Prompt_Is_Seen is implemented.
&{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} PASSWD=${password}
TemplatedRequests.Put_As_Xml_Templated ${DIR_WITH_TEMPLATES}${/}pcep_topology_node mapping=${mapping}
&{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} PASSWD=${password}
TemplatedRequests.Put_As_Xml_Templated ${DIR_WITH_TEMPLATES}${/}pcep_topology_node mapping=${mapping}
[Documentation] Send ctrl+c to pcc-mock, fails if no prompt is seen
... after 3 seconds (the default for SSHLibrary)
RemoteBash.Write_Bare_Ctrl_C
[Documentation] Send ctrl+c to pcc-mock, fails if no prompt is seen
... after 3 seconds (the default for SSHLibrary)
RemoteBash.Write_Bare_Ctrl_C
- ${command}= NexusKeywords.Compose_Full_Java_Command -jar ${filename} --password ${password} --reconnect 1 --local-address ${TOOLS_SYSTEM_IP} --remote-address ${ODL_SYSTEM_IP} 2>&1 | tee pccmock.log
+ [Arguments] ${password}
+ ${command} NexusKeywords.Compose_Full_Java_Command
+ ... -jar ${filename} --password ${password} --reconnect 1 --local-address ${TOOLS_SYSTEM_IP} --remote-address ${ODL_SYSTEM_IP} 2>&1 | tee pccmock.log