*** Variables ***
&{Stream_dict}
-... nitrogen=${7}
... oxygen=${8}
... fluorine=${9}
... neon=${10}
... ${value_if_true}
... ${value_if_false}
-Set_Variable_If_At_Least_Oxygen
- [Documentation] Compare oxygen to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least oxygen,
- ... return ${value_if_false} otherwise.
- [Arguments] ${value_if_true} ${value_if_false}
- BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least oxygen ${value_if_true} ${value_if_false}
-
Set_Variable_If_At_Least_Fluorine
[Documentation] Compare fluorine to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at least fluorine,
... return ${value_if_false} otherwise.
[Arguments] ${value_if_true} ${value_if_false}
BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Least chlorine ${value_if_true} ${value_if_false}
-Set_Variable_If_At_Most_Nitrogen
- [Documentation] Compare nitrogen to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most nitrogen,
- ... return ${value_if_false} otherwise.
- [Arguments] ${value_if_true} ${value_if_false}
- BuiltIn.Run_Keyword_And_Return Set_Variable_If_At_Most nitrogen ${value_if_true} ${value_if_false}
-
Set_Variable_If_At_Most_Oxygen
[Documentation] Compare oxygen to ${ODL_STREAM} and return ${value_if_true} if ${ODL_STREAM} is at most oxygen,
... return ${value_if_false} otherwise.
... @{varargs}
... &{kwargs}
-Run_Keyword_If_At_Least_Oxygen
- [Documentation] Compare oxygen to ${ODL_STREAM} and in case ${ODL_STREAM} is at least oxygen,
- ... run ${kw_name} @{varargs} &{kwargs} and return its value.
- [Arguments] ${kw_name} @{varargs} &{kwargs}
- BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least oxygen ${kw_name} @{varargs} &{kwargs}
-
Run_Keyword_If_At_Least_Fluorine
[Documentation] Compare fluorine to ${ODL_STREAM} and in case ${ODL_STREAM} is at least fluorine,
... run ${kw_name} @{varargs} &{kwargs} and return its value.
[Arguments] ${kw_name} @{varargs} &{kwargs}
BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Least chlorine ${kw_name} @{varargs} &{kwargs}
-Run_Keyword_If_At_Most_Nitrogen
- [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is at most nitrogen,
- ... run ${kw_name} @{varargs} &{kwargs} and return its value.
- [Arguments] ${kw_name} @{varargs} &{kwargs}
- BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most nitrogen ${kw_name} @{varargs} &{kwargs}
-
Run_Keyword_If_At_Most_Oxygen
[Documentation] Compare oxygen to ${ODL_STREAM} and in case ${ODL_STREAM} is at most oxygen,
... run ${kw_name} @{varargs} &{kwargs} and return its value.
[Arguments] ${kw_name} @{varargs} &{kwargs}
BuiltIn.Run_Keyword_And_Return Run_Keyword_If_At_Most chlorine ${kw_name} @{varargs} &{kwargs}
-Run_Keyword_If_More_Than_Nitrogen
- [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is more than nitrogen,
- ... run ${kw_name} @{varargs} &{kwargs} and return its value.
- [Arguments] ${kw_name} @{varargs} &{kwargs}
- BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than nitrogen ${kw_name} @{varargs} &{kwargs}
-
Run_Keyword_If_More_Than_Oxygen
[Documentation] Compare oxygen to ${ODL_STREAM} and in case ${ODL_STREAM} is more than oxygen,
... run ${kw_name} @{varargs} &{kwargs} and return its value.
[Arguments] ${kw_name} @{varargs} &{kwargs}
BuiltIn.Run_Keyword_And_Return Run_Keyword_If_More_Than chlorine ${kw_name} @{varargs} &{kwargs}
-Run_Keyword_If_Less_Than_Nitrogen
- [Documentation] Compare nitrogen to ${ODL_STREAM} and in case ${ODL_STREAM} is less than nitrogen,
- ... run ${kw_name} @{varargs} &{kwargs} and return its value.
- [Arguments] ${kw_name} @{varargs} &{kwargs}
- BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than nitrogen ${kw_name} @{varargs} &{kwargs}
-
-Run_Keyword_If_Less_Than_Oxygen
- [Documentation] Compare oxygen to ${ODL_STREAM} and in case ${ODL_STREAM} is less than oxygen,
- ... run ${kw_name} @{varargs} &{kwargs} and return its value.
- [Arguments] ${kw_name} @{varargs} &{kwargs}
- BuiltIn.Run_Keyword_And_Return Run_Keyword_If_Less_Than oxygen ${kw_name} @{varargs} &{kwargs}
-
Run_Keyword_If_Less_Than_Fluorine
[Documentation] Compare fluorine to ${ODL_STREAM} and in case ${ODL_STREAM} is less than fluorine,
... run ${kw_name} @{varargs} &{kwargs} and return its value.
Library SSHLibrary
Library string
Resource ClusterManagement.robot
-Resource CompareStream.robot
Resource DataModels.robot
Resource KarafKeywords.robot
Resource ODLTools.robot
Start Suite
[Documentation] Initial setup for Genius test suites
- Run_Keyword_If_At_Least_Oxygen
- ... Wait Until Keyword Succeeds
+ Wait Until Keyword Succeeds
... 60
... 2
... ClusterManagement.Check Status Of Services Is OPERATIONAL
Resource ../../../libraries/Utils.robot
Resource ../../../libraries/RemoteBash.robot
Resource ../../../libraries/TemplatedRequests.robot
-Resource ../../../libraries/CompareStream.robot
Resource ../../../variables/Variables.robot
Variables ../../../variables/pcepuser/${ODL_STREAM}/variables.py ${TOOLS_SYSTEM_IP}
Configure_Speaker_Entity_Identifier
[Documentation] Additional PCEP Speaker configuration for at least oxygen streams.
... Allows PCEP speaker to determine if state synchronization can be skipped when a PCEP session is restarted.
- CompareStream.Run_Keyword_If_Less_Than_Oxygen
- ... BuiltIn.Pass_Execution
- ... Test case valid only for versions oxygen and above.
&{mapping}= BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP}
TemplatedRequests.Put_As_Xml_Templated
... ${PCEP_VARIABLES_FOLDER}${/}node_speaker_entity_identifier
Documentation Test Suite for verification of HWVTEP usecases
Resource ../../libraries/L2GatewayOperations.robot
-Resource ../../libraries/CompareStream.robot
Suite Setup Basic Suite Setup
Suite Teardown Basic Suite Teardown
TC14 Create, Update And Attach 2nd Neutron Port to Hwvtep Namespace 1
[Documentation] Create and attach 2nd port to HWVTEP in network 1
- CompareStream.Run_Keyword_If_At_Most_Nitrogen BuiltIn.Pass_Execution Only run on oxygen and later
OpenStackOperations.Create Neutron Port With Additional Params
... ${NET_1}
... ${HWVTEP_PORT_3}
[Tags] critical
NetconfKeywords.Configure_Device_In_Netconf
... ${DEVICE_NAME}
- ... device_type=${DEVICE_TYPE}
+ ... device_type=${DEVICE_TYPE_RPC_CREATE}
... http_timeout=2
... http_method=post
[Documentation] Make request to deconfigure the testtool device on Netconf connector.
[Tags] critical
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- CompareStream.Run_Keyword_If_At_Most_Nitrogen
- ... NetconfKeywords.Remove_Device_From_Netconf
- ... ${DEVICE_NAME}
- ... location=${DELETE_LOCATION}
- CompareStream.Run_Keyword_If_At_Least_Oxygen
- ... NetconfKeywords.Configure_Device_In_Netconf
+ NetconfKeywords.Configure_Device_In_Netconf
... ${DEVICE_NAME}
... device_type=${DEVICE_TYPE_RPC_DELETE}
... http_timeout=2
... """${USE_NETCONF_CONNECTOR}""" == """True"""
... default
... ${DEVICE_TYPE_RPC}
- ${DEVICE_TYPE} = CompareStream.Set_Variable_If_At_Most_Nitrogen
- ... ${DEVICE_TYPE_RPC}
- ... ${DEVICE_TYPE_RPC_CREATE}
- BuiltIn.Set_Suite_Variable ${DEVICE_TYPE}
OperatingSystem.File Should Exist ${RPC_FILE}
NetconfKeywords.Install_And_Start_Testtool
... device-count=1
[Tags] critical
NetconfKeywords.Configure_Device_In_Netconf
... ${device_name}
- ... device_type=${device_type}
+ ... device_type=${device_type_rpc_create}
... http_timeout=2
... http_method=post
... data was really stored in the device.
[Tags] critical
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- CompareStream.Run_Keyword_If_At_Most_Nitrogen
- ... NetconfKeywords.Remove_Device_From_Netconf
- ... ${device_name}
- ... location=${delete_location}
- CompareStream.Run_Keyword_If_At_Least_Oxygen
- ... NetconfKeywords.Configure_Device_In_Netconf
+ NetconfKeywords.Configure_Device_In_Netconf
... ${device_name}
... device_type=${device_type_rpc_delete}
... http_timeout=2
[Tags] critical
NetconfKeywords.Configure_Device_In_Netconf
... ${device_name}
- ... device_type=${device_type}
+ ... device_type=${device_type_rpc_create}
... http_timeout=2
... http_method=post
[Documentation] Make request to deconfigure the testtool device on Netconf connector.
[Tags] critical
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- CompareStream.Run_Keyword_If_At_Most_Nitrogen
- ... NetconfKeywords.Remove_Device_From_Netconf
- ... ${device_name}
- ... location=${delete_location}
- CompareStream.Run_Keyword_If_At_Least_Oxygen
- ... NetconfKeywords.Configure_Device_In_Netconf
+ NetconfKeywords.Configure_Device_In_Netconf
... ${device_name}
... device_type=${device_type_rpc_delete}
... http_timeout=2
... """${USE_NETCONF_CONNECTOR}""" == """True"""
... default
... ${device_type_rpc}
- ${device_type}= CompareStream.Set_Variable_If_At_Most_Nitrogen
- ... ${device_type_rpc}
- ... ${device_type_rpc_create}
- BuiltIn.Set_Suite_Variable ${device_type}
Teardown_Everything
[Documentation] Teardown the test infrastructure, perform cleanup and release all resources.
Resource ${CURDIR}/../../../libraries/NetconfKeywords.robot
Resource ${CURDIR}/../../../libraries/SetupUtils.robot
Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/../../../libraries/CompareStream.robot
Resource ${CURDIR}/../../../variables/Variables.robot
Suite Setup Suite Setup
Configure_Device_On_Netconf
[Documentation] Make request to configure netconf netopeer with wrong password. Correct auth is netconf/netconf
... ODL should connect to device using public key auth as password auth will fail.
- NetconfKeywords.Configure_Device_In_Netconf ${device_name} device_type=${device_type}
+ NetconfKeywords.Configure_Device_In_Netconf ${device_name} device_type=${device_type_key}
... device_port=${netopeer_port} device_user=${netopeer_username} device_password=${netopeer_password}
... device_key=${netopeer_key} http_timeout=2
... return_stdout=True return_stderr=True return_rc=True
Log ${stdout}
-Configure ODL with Key config
- [Documentation] Configure the ODL with the Southbound key configuration file containing details about private key path and passphrase
- SSHKeywords.Open_Connection_To_ODL_System
- Log Bundle folder ${WORKSPACE}/${BUNDLEFOLDER}/etc
- SSHLibrary.Put File
- ... ${CURDIR}/../../../variables/netconf/KeyAuth/org.opendaylight.netconf.topology.sb.keypair.cfg
- ... ${WORKSPACE}/${BUNDLEFOLDER}/etc/
- SSHLibrary.Put File
- ... ${CURDIR}/../../../variables/netconf/KeyAuth/sb-rsa-key
- ... ${WORKSPACE}/${BUNDLEFOLDER}/etc/
- ... 400
- ${stdout}= SSHLibrary.Execute Command ls -l ${WORKSPACE}/${BUNDLEFOLDER}/etc/ return_stdout=True
- Log ${stdout}
- Restart Controller
-
Add Netconf Key
[Documentation] Add Netconf Southbound key containing details about device private key and passphrase
${mapping}= BuiltIn.Create_dictionary DEVICE_KEY=${netopeer_key}
... """${USE_NETCONF_CONNECTOR}""" == """True"""
... default
... ${device_type_passw}
- ${device_type}= CompareStream.Set_Variable_If_At_Most_Nitrogen ${device_type_passw} ${device_type_key}
- BuiltIn.Set_Suite_Variable ${device_type}
Run Netopeer Docker Container
- CompareStream.Run_Keyword_If_At_Most_Nitrogen Configure ODL with Key config
- CompareStream.Run_Keyword_If_At_Least_Oxygen Add Netconf Key
+ Add Netconf Key
Library ../../../libraries/SFC/SfcUtils.py
Resource ../../../libraries/SFC/SfcKeywords.robot
Resource ../../../libraries/ClusterOpenFlow.robot
-Resource ../../../libraries/CompareStream.robot
Resource ../../../libraries/KarafKeywords.robot
Resource ../../../variables/sfc/Variables.robot
Resource ../../../libraries/Utils.robot
... session=${session}
... folder=${RESTCONF_MODULES_DIR}
... verify=False
- # From oxygen, RSPs are persisted between reboots
- Run_Keyword_If_At_Least_Else
- ... oxygen
- ... Wait until Keyword succeeds
+ Wait until Keyword succeeds
... 2min
... 5 sec
... Get Data From URI
... session
... ${OPERATIONAL_RSPS_URI}
- ... ELSE
- ... No Content From URI
- ... session
- ... ${OPERATIONAL_RSPS_URI}
[Teardown] Remove SFC Elements
+++ /dev/null
-private-key-path=etc/sb-rsa-key
-private-key-passphrase=topsecret