diff options
author | Charalampos Kominos <Charalampos.Kominos@enea.com> | 2018-04-09 13:35:33 +0200 |
---|---|---|
committer | Charalampos Kominos <Charalampos.Kominos@enea.com> | 2018-04-10 15:33:44 +0200 |
commit | 704e7277cca4f6b05b9d5376eb0c430a855519be (patch) | |
tree | 0c9c184d71a3c0a790e14980a134b5b0d0408745 | |
parent | cabfeecb3259c5e22488756d91b6f72d27c4c18a (diff) |
Fix aarch64 image naming in parser
Some hardcoded values within the parser project create problems for
opnfv-armband. In this patch we fix image naming for parser, at
least for the testcase we run in opnfv-ci.
1)Tosca functions like get_attribute() or get_item() could in theory
be used but due to the current structure of the vRNC file it is not
possible.
JIRA: ARMBAND-369
JIRA: PARSER-175
Change-Id: I8cdc82b9e5c9008f3a3a5110d65706440d208ab8
Signed-off-by: Charalampos Kominos <Charalampos.Kominos@enea.com>
-rwxr-xr-x | tests/functest_run.sh | 20 | ||||
-rw-r--r-- | tosca2heat/heat-translator/translator/common/images.py | 7 |
2 files changed, 20 insertions, 7 deletions
diff --git a/tests/functest_run.sh b/tests/functest_run.sh index 08181fa..f6a50c5 100755 --- a/tests/functest_run.sh +++ b/tests/functest_run.sh @@ -21,6 +21,13 @@ POD_ARCH=${POD_ARCH:-$(uname -m)} } LOCAL_IMAGE_FILE=${1:-""} +# VRNC_INPUT_TEMPLATE_FILE=${PARSER_WORK_DIR}/../tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml +# VRNC_INPUT_TEMPLATE_RAW_FILE=${PARSER_WORK_DIR}/../tosca2heat/heat-translator/translator/tests/data/test_tosca_nfv_sample.yaml +VRNC_INPUT_TEMPLATE_RAW_FILE=${PARSER_WORK_DIR}/../tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml +VRNC_OUTPUT_TEMPLATE_FILE=${PARSER_WORK_DIR}/../tosca2heat/heat-translator/translator/tests/data/vRNC/vRNC_Hot_Template.yaml + +PARSER_IMAGE_NAME=cirros-0.3.2-x86_64-uec + if [ -e "${LOCAL_IMAGE_FILE}" ]; then echo "Input local image file: ${LOCAL_IMAGE_FILE}" PARSER_IMAGE_URL_FILE=${LOCAL_IMAGE_FILE} @@ -31,6 +38,10 @@ else echo "" echo "${POD_ARCH} Detected. The proper image file for that architecture will be downloaded" PARSER_IMAGE_URL_FILE=cirros-0.4.0-aarch64-disk.img + PARSER_IMAGE_NAME=cirros-0.4.0-aarch64-disk + sed -i 's/x86_64/aarch64/g' ${VRNC_INPUT_TEMPLATE_RAW_FILE} + sed -i 's/0.3.2/0.4.0/g' ${VRNC_INPUT_TEMPLATE_RAW_FILE} + else PARSER_IMAGE_URL_FILE=cirros-0.3.5-x86_64-disk.img # PARSER_IMAGE_URL=https://launchpad.net/cirros/trunk/0.3.0/+download/${PARSER_IMAGE_URL_FILE} @@ -45,7 +56,7 @@ fi # PARSER_IMAGE_NAME=rhel-6.5-test-image # fixed image name according to the translator's default value of images -PARSER_IMAGE_NAME=cirros-0.3.2-x86_64-uec + PARSER_IMAGE_FILE="${PARSER_IMAGE_NAME}.img" PARSER_IMAGE_FORMAT=qcow2 @@ -65,10 +76,7 @@ VM_FLAVOR_DISK=1 PARSER_STACK_NAME=vRNC_Stack -# VRNC_INPUT_TEMPLATE_FILE=${PARSER_WORK_DIR}/../tosca2heat/tosca-parser/toscaparser/extensions/nfv/tests/data/vRNC/Definitions/vRNC.yaml -# VRNC_INPUT_TEMPLATE_RAW_FILE=${PARSER_WORK_DIR}/../tosca2heat/heat-translator/translator/tests/data/test_tosca_nfv_sample.yaml -VRNC_INPUT_TEMPLATE_RAW_FILE=${PARSER_WORK_DIR}/../tosca2heat/heat-translator/translator/tests/data/vRNC/Definitions/vRNC.yaml -VRNC_OUTPUT_TEMPLATE_FILE=${PARSER_WORK_DIR}/../tosca2heat/heat-translator/translator/tests/data/vRNC/vRNC_Hot_Template.yaml + VRNC_INPUT_TEMPLATE_FILE=${VRNC_INPUT_TEMPLATE_RAW_FILE%.*}_patch.yaml @@ -82,7 +90,7 @@ download_parser_image() { echo "" echo " Download image ${PARSER_IMAGE_URL_FILE}..." - wget ${PARSER_IMAGE_URL} -O ${PARSER_IMAGE_FILE} -o download.log + wget ${PARSER_IMAGE_URL} -O ${PARSER_IMAGE_FILE} } register_parser_image_and_flavor() { diff --git a/tosca2heat/heat-translator/translator/common/images.py b/tosca2heat/heat-translator/translator/common/images.py index d9b8818..f3138bd 100644 --- a/tosca2heat/heat-translator/translator/common/images.py +++ b/tosca2heat/heat-translator/translator/common/images.py @@ -64,7 +64,12 @@ PREDEF_IMAGES = { 'os_type': 'linux', 'os_distro': 'rhel', 'os_version': '6.5' - } + }, + 'cirros-0.4.0-aarch64-disk': {'architecture': 'aarch64', + 'os_type': 'linux', + 'os_distro': 'cirros', + 'os_version': '0.4.0' + } } SESSION = None |