summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiaodong shang <shang.xiaodong@zte.com.cn>2018-04-26 09:12:17 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-04-26 09:12:17 +0000
commit320ca9e335797f2081f253df60a860e72b6cc9fb (patch)
tree25fed6bf11a54857966acda9bbc09c90fb95cfd8
parentc74673ad0818a89f5e23c9e0be1c7b933472c1f4 (diff)
parent704e7277cca4f6b05b9d5376eb0c430a855519be (diff)
Merge "Fix aarch64 image naming in parser"HEADopnfv-6.0.01.0.1master
-rwxr-xr-xtests/functest_run.sh20
-rw-r--r--tosca2heat/heat-translator/translator/common/images.py7
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