Resource ${CURDIR}/../../../libraries/SetupUtils.robot
Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource ${CURDIR}/../../../libraries/NexusKeywords.robot
*** Variables ***
${ALTERNATIVE_BUNDLEFOLDER_PARENT} /tmp/older
${CLUSTER_BOOTUP_SYNC_TIMEOUT} 1200s # Rebooting after kill may take longer time, especially for -all- install.
${ITERATIONS} 1000
${MOVE_PER_ITER} 1000
-${PREVIOUS_ODL_RELEASE_ZIP_URL} https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/0.4.2-Beryllium-SR2/distribution-karaf-0.4.2-Beryllium-SR2.zip
-${PYTHON_UTILITY_FILENAME} patch_cars_be_sr2.py
+${PREVIOUS_ODL_RELEASE_ZIP_URL} ${EMPTY}
+${PYTHON_UTILITY_FILENAME} replace_cars.py
${SEGMENT_SIZE} 10000
*** Test Cases ***
+Select_Latest_Previous_Release_If_Not_Specified
+ [Documentation] If previous ODL release is not specified, then latest release for previous to current stream is used.
+ ... Note: If current stream is not found on nexus, then it is taken as new one (not released yet).
+ ... So in this case, latest release version is return.
+ BuiltIn.Set_Suite_Variable ${odl_zip_url} ${PREVIOUS_ODL_RELEASE_ZIP_URL}
+ BuiltIn.Pass_Execution_If '${odl_zip_url}'!='' Bundle url to previous release is provided: ${PREVIOUS_ODL_RELEASE_ZIP_URL}, no need to search in nexus.
+ ${previous_release} = NexusKeywords.Get_Latest_ODL_Previous_Stream_Release_URL ${ODL_STREAM}
+ BuiltIn.Set_Suite_Variable ${odl_zip_url} ${previous_release}
+
Kill_Original_Odl
[Documentation] The ODL prepared by releng/builder is the newer one, kill it.
... Also, remove journal and snapshots.
Install_Older_Odl
[Documentation] Download .zip of older ODL, unpack, delete .zip, copy featuresBoot line.
# Download.
- SSHKeywords.Execute_Command_Should_Pass mkdir -p "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && rm -rf * && wget -N "${PREVIOUS_ODL_RELEASE_ZIP_URL}"
+ SSHKeywords.Execute_Command_Should_Pass mkdir -p "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && rm -rf * && wget -N "${odl_zip_url}"
# Unzip and detect bundle folder name.
${bundle_dir} = SSHKeywords.Execute_Command_Should_Pass cd "${ALTERNATIVE_BUNDLEFOLDER_PARENT}" && unzip -q *.zip && rm *.zip && ls -1
BuiltIn.Set_Suite_Variable \${alternative_bundlefolder} ${ALTERNATIVE_BUNDLEFOLDER_PARENT}/${bundle_dir}