Rename IMG_PROP to IMAGE_PROPERTIES 25/63225/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Sat, 6 Oct 2018 06:26:39 +0000 (08:26 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sat, 6 Oct 2018 06:38:20 +0000 (08:38 +0200)
Any other env vars are reduced.

Change-Id: Ic2c37d6efd543603a2495f9d2621b66d61710a54
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/core/singlevm.py
functest/opnfv_tests/openstack/tempest/tempest.py
functest/utils/env.py

index c9a8178..d1806eb 100644 (file)
@@ -74,10 +74,11 @@ 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(','))))
+        if env.get('IMAGE_PROPERTIES'):
+            extra_properties.update(
+                dict((k.strip(), v.strip()) for k, v in (
+                    item.split(': ') for item in env.get(
+                        'IMAGE_PROPERTIES').split(','))))
         extra_properties.update(
             getattr(config.CONF, '{}_extra_properties'.format(
                 self.case_name), {}))
@@ -109,10 +110,11 @@ 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(','))))
+        if env.get('IMAGE_PROPERTIES'):
+            extra_alt_properties.update(
+                dict((k.strip(), v.strip()) for k, v in (
+                    item.split(': ') for item in env.get(
+                        'IMAGE_PROPERTIES').split(','))))
         extra_alt_properties.update(
             getattr(config.CONF, '{}_extra_alt_properties'.format(
                 self.case_name), {}))
index ddd0d64..b3108b4 100644 (file)
@@ -367,10 +367,11 @@ 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(','))))
+        if env.get('IMAGE_PROPERTIES'):
+            extra_properties.update(
+                dict((k.strip(), v.strip()) for k, v in (
+                    item.split(': ') for item in env.get(
+                        'IMAGE_PROPERTIES').split(','))))
         extra_properties.update(
             getattr(config.CONF, '{}_extra_properties'.format(
                 self.case_name), {}))
index 87940ce..4015020 100644 (file)
@@ -32,7 +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': '',
+    'IMAGE_PROPERTIES': '',
     'NAMESERVER': '8.8.8.8',
     'NEW_USER_ROLE': 'Member',
     'USE_DYNAMIC_CREDENTIALS': 'True'