Support only Oxygen+ distributions 87/102587/5
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 10 Oct 2022 09:40:30 +0000 (11:40 +0200)
committerSangwook Ha <sangwook.ha@verizon.com>
Tue, 20 Jun 2023 18:43:41 +0000 (11:43 -0700)
Nitrogen is not supported anymore, remove the keywords and update
their keywords to work as if the distro is always at least Oxygen.
Also eliminate If_At_Least_Oxygen macros, as they evaluate to true.

JIRA: INTTEST-133
Change-Id: Ic048e57558cdf86f9785be191b55f7bfbb32cfd8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
csit/libraries/CompareStream.robot
csit/libraries/Genius.robot
csit/suites/bgpcep/pcepuser/pcepuser.robot
csit/suites/l2gw/01_Configure_verify_l2gateway.robot
csit/suites/netconf/CRUD-ACTION/CRUD-ACTION.robot
csit/suites/netconf/CRUD/CRUD-RPC.robot
csit/suites/netconf/KeyAuth/keyauth.robot
csit/suites/sfc/SFC_Persistency/020__sfc_persistency.robot
csit/variables/netconf/KeyAuth/org.opendaylight.netconf.topology.sb.keypair.cfg [deleted file]

index deccc6ee6a138654f38c8bd20546ac9a2b3bdeef..8923236fbb4f08cb648b0aab4a7d9d423472605a 100644 (file)
@@ -11,7 +11,6 @@ Library             String
 
 *** Variables ***
 &{Stream_dict}
-...                 nitrogen=${7}
 ...                 oxygen=${8}
 ...                 fluorine=${9}
 ...                 neon=${10}
@@ -47,12 +46,6 @@ Set_Variable_If_At_Most
     ...    ${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.
@@ -101,12 +94,6 @@ Set_Variable_If_At_Least_Chlorine
     [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.
@@ -302,12 +289,6 @@ Run_Keyword_If_Less_Than
     ...    @{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.
@@ -362,12 +343,6 @@ Run_Keyword_If_At_Least_Chlorine
     [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.
@@ -428,12 +403,6 @@ Run_Keyword_If_At_Most_Chlorine
     [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.
@@ -494,18 +463,6 @@ Run_Keyword_If_More_Than_Chlorine
     [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.
index 6d1ff4d55ad417fa07be7bcc40b89fe1041053b4..da585dbc8902be2559e1c24dfca30f5091889441 100644 (file)
@@ -7,7 +7,6 @@ Library             RequestsLibrary
 Library             SSHLibrary
 Library             string
 Resource            ClusterManagement.robot
-Resource            CompareStream.robot
 Resource            DataModels.robot
 Resource            KarafKeywords.robot
 Resource            ODLTools.robot
@@ -53,8 +52,7 @@ Genius Suite Teardown
 
 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
index 4e1b6f7cf5bdeef8a31d783a67ba76c4ce9a8736..d9e2639d67e5ba77207d9cd8e5be83d609e4722d 100644 (file)
@@ -16,7 +16,6 @@ Resource            ../../../libraries/PcepOperations.robot
 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}
 
@@ -50,9 +49,6 @@ Start_Pcc_Mock
 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
index 076dae845d7abaf06ee813b5e6b4a3908425587c..2024b07463676be5a8b12112a8c28325361ac896 100644 (file)
@@ -2,7 +2,6 @@
 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
@@ -248,7 +247,6 @@ TC13 Ping Between Namespace In Second Network To Vm In First Network
 
 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}
index 38ba576e53b95f86d2cb418b8249b810f0286279..ae367856cd532ae98ffc68b967d14ca334376733 100644 (file)
@@ -51,7 +51,7 @@ Configure_Device_On_Netconf
     [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
 
@@ -100,12 +100,7 @@ Deconfigure_Device_From_Netconf
     [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
@@ -134,10 +129,6 @@ Setup_Everything
     ...    """${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
index 996c90c9fca894a8559358344c052ba71cb5fc3d..6429dd641600d7db2ed61c7b4e5a21de83f74464 100644 (file)
@@ -64,7 +64,7 @@ Configure_Device_On_Netconf
     [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
 
@@ -110,12 +110,7 @@ Deconfigure_Device_From_Netconf_Temporarily
     ...    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
@@ -131,7 +126,7 @@ Configure_The_Device_Back
     [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
 
@@ -242,12 +237,7 @@ Deconfigure_Device_From_Netconf
     [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
@@ -277,10 +267,6 @@ Setup_Everything
     ...    """${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.
index 4ea3f55c6ecffd9c66c535e1e0510af20085ca96..2b655f98cddb3146e217fcf89e69b25b3017d091 100644 (file)
@@ -9,7 +9,6 @@ Resource            ../../../variables/Variables.robot
 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
@@ -38,7 +37,7 @@ Check_Device_Is_Not_Configured_At_Beginning
 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
 
@@ -79,21 +78,6 @@ Run Netopeer Docker Container
     ...    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}
@@ -126,8 +110,5 @@ Suite Setup
     ...    """${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
index 692db1d9903f2b703286e4aae54019f080f15964..0b3aacd3c90bb386c3516c2e2df53251a87dd84e 100644 (file)
@@ -8,7 +8,6 @@ Library             RequestsLibrary
 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
@@ -59,19 +58,12 @@ Add SFC Elements and restart cluster
     ...    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
 
 
diff --git a/csit/variables/netconf/KeyAuth/org.opendaylight.netconf.topology.sb.keypair.cfg b/csit/variables/netconf/KeyAuth/org.opendaylight.netconf.topology.sb.keypair.cfg
deleted file mode 100644 (file)
index 16e0300..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-private-key-path=etc/sb-rsa-key
-private-key-passphrase=topsecret