Protect vs OS_TENANT_NAME or _ID in shaker 51/60151/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Tue, 24 Jul 2018 09:12:25 +0000 (11:12 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Tue, 24 Jul 2018 09:14:52 +0000 (11:14 +0200)
It fixes the possible mismatch if both OS_TENANT and OS_PROJECT are
set [1].

[1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/lastFailedBuild/console

Change-Id: I66b6e3cf30a34aff1234da00cdd6b40da92089e5
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/opnfv_tests/openstack/shaker/shaker.py

index 51244e2..097d9b2 100644 (file)
@@ -84,6 +84,9 @@ class Shaker(singlevm.SingleVm2):
             'export OS_AUTH_URL={} && '
             'export OS_USERNAME={} && '
             'export OS_PROJECT_NAME={} && '
+            'export OS_PROJECT_ID={} && '
+            'unset OS_TENANT_NAME && '
+            'unset OS_TENANT_ID && '
             'export OS_PASSWORD={} && '
             '{}'
             'env && '
@@ -95,7 +98,7 @@ class Shaker(singlevm.SingleVm2):
             'openstack/perf_l3_north_south '
             '--report report.html --output report.json'.format(
                 endpoint, self.project.user.name, self.project.project.name,
-                self.project.password,
+                self.project.project.id, self.project.password,
                 'export OS_CACERT=~/os_cacert && ' if os.environ.get(
                     'OS_CACERT') else '',
                 self.image.name, self.flavor.name,