aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2018-10-06 06:20:38 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-10-06 06:20:38 +0000
commit6b0fa7ecb5aa0c0dead1d16c2811f5c47347a091 (patch)
tree2e215158d478583224b1ee6cd4397faf42e31f39
parent6efcc4fe7456663445e9fbda54bba3239288ad73 (diff)
parentd7c5419ed8d3dcdb59f4f5f254de0c7bb7a0aec6 (diff)
Merge "Use environment variable for image properties"
-rw-r--r--functest/ci/config_aarch64_patch.yaml124
-rw-r--r--functest/core/singlevm.py9
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py4
-rw-r--r--functest/utils/env.py1
4 files changed, 14 insertions, 124 deletions
diff --git a/functest/ci/config_aarch64_patch.yaml b/functest/ci/config_aarch64_patch.yaml
index a4b0cd497..835a82737 100644
--- a/functest/ci/config_aarch64_patch.yaml
+++ b/functest/ci/config_aarch64_patch.yaml
@@ -2,222 +2,98 @@
os:
general:
openstack:
- image_name: TestVM
image_file_name: cirros-0.4.0-aarch64-disk.img
- image_password: gocubsgo
image_url:
/home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- short_id: 'ubuntu16.04'
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
vmready1:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
vmready2:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
singlevm1:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
singlevm2:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
vping_ssh:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
vping_userdata:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
cinder_test:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
tempest_smoke:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
neutron-tempest-plugin-api:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
refstack_defcore:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
patrole:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
vmtp:
image:
/home/opnfv/functest/images/ubuntu-14.04-server-cloudimg-arm64-uefi1.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
shaker:
image: /home/opnfv/functest/images/shaker-image-arm64.qcow2
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
neutron_trunk:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
networking-bgpvpn:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
networking-sfc:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
barbican:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
tempest_full:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
tempest_scenario:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
image_alt: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
- extra_alt_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
rally_sanity:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
rally_full:
image: /home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
snaps:
images:
glance_tests:
disk_file:
/home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- short_id: 'ubuntu16.04'
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
cirros:
disk_file:
/home/opnfv/functest/images/cirros-0.4.0-aarch64-disk.img
- extra_properties:
- short_id: 'ubuntu16.04'
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
ubuntu:
disk_file:
/home/opnfv/functest/images/ubuntu-14.04-server-cloudimg-arm64-uefi1.img
- extra_properties:
- hw_disk_bus: 'scsi'
- hw_scsi_model: 'virtio-scsi'
centos:
disk_file:
/home/opnfv/functest/images/CentOS-7-aarch64-GenericCloud.qcow2
- vping:
- image_name: TestVM
-
tempest:
use_custom_flavors: 'True'
-
- odl_sfc:
- image_base_url: "http://artifacts.opnfv.org/sfc/demo"
- image_name: sfc_nsh_danube
- image_file_name: sf_nsh_danube_arm64.img
- image_initrd: sf_nsh_danube_arm64-initrd
- image_kernel: sf_nsh_danube_arm64-kernel
- image_format: ami
- os_cmd_line: 'root=LABEL=cloudimg-rootfs ro'
- doctor:
- image_name: TestVM
diff --git a/functest/core/singlevm.py b/functest/core/singlevm.py
index 71ed0690d..c9a8178b9 100644
--- a/functest/core/singlevm.py
+++ b/functest/core/singlevm.py
@@ -23,6 +23,7 @@ from xtesting.core import testcase
from functest.core import tenantnetwork
from functest.utils import config
+from functest.utils import env
class VmReady1(tenantnetwork.TenantNetwork1):
@@ -73,6 +74,10 @@ class VmReady1(tenantnetwork.TenantNetwork1):
"""
assert self.cloud
extra_properties = self.extra_properties.copy()
+ if env.get('IMG_PROP'):
+ extra_properties.update(dict((k.strip(), v.strip()) for k, v in
+ (item.split(': ') for item in
+ env.get('IMG_PROP').split(','))))
extra_properties.update(
getattr(config.CONF, '{}_extra_properties'.format(
self.case_name), {}))
@@ -104,6 +109,10 @@ class VmReady1(tenantnetwork.TenantNetwork1):
"""
assert self.cloud
extra_alt_properties = self.extra_alt_properties.copy()
+ if env.get('IMG_PROP'):
+ extra_alt_properties.update(dict((k.strip(), v.strip()) for k, v in
+ (item.split(': ') for item in
+ env.get('IMG_PROP').split(','))))
extra_alt_properties.update(
getattr(config.CONF, '{}_extra_alt_properties'.format(
self.case_name), {}))
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 73bb443ab..4c5308bdf 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -382,6 +382,10 @@ class TempestCommon(singlevm.VmReady2):
config.CONF, '{}_image_format'.format(self.case_name),
self.image_format))
extra_properties = self.extra_properties.copy()
+ if env.get('IMG_PROP'):
+ extra_properties.update(dict((k.strip(), v.strip()) for k, v in
+ (item.split(': ') for item in
+ env.get('IMG_PROP').split(','))))
extra_properties.update(
getattr(config.CONF, '{}_extra_properties'.format(
self.case_name), {}))
diff --git a/functest/utils/env.py b/functest/utils/env.py
index 3d8154ca9..26efbb196 100644
--- a/functest/utils/env.py
+++ b/functest/utils/env.py
@@ -32,6 +32,7 @@ INPUTS = {
'ENERGY_RECORDER_API_USER': env.INPUTS['ENERGY_RECORDER_API_USER'],
'ENERGY_RECORDER_API_PASSWORD': env.INPUTS['ENERGY_RECORDER_API_PASSWORD'],
'VOLUME_DEVICE_NAME': 'vdb',
+ 'IMG_PROP': '',
'NAMESERVER': '8.8.8.8',
'NEW_USER_ROLE': 'Member',
'USE_DYNAMIC_CREDENTIALS': 'True',