From 6d5f0e645ad20b03bcb17817796acbe354bfd71f Mon Sep 17 00:00:00 2001 From: Yaroslav Lobankov Date: Sat, 27 Feb 2016 21:40:27 -0600 Subject: [PATCH] [Verify] Fixing Tempest resources context to create network resources Tempest resources context fails to create network resources because Neutron raises the 'BadRequest: Invalid input for tenant_id. Reason: 'None' is not a valid string.' exception. The issue was introduced by https://review.openstack.org/#/c/282918/. So this patch is intended to fix the issue. Closes-Bug: #1550848 Change-Id: I33b0bb2cdec55acf8446b0fab04e34c9f200fafd --- rally/verification/tempest/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rally/verification/tempest/config.py b/rally/verification/tempest/config.py index ce2357038c..475941c6cb 100644 --- a/rally/verification/tempest/config.py +++ b/rally/verification/tempest/config.py @@ -479,10 +479,12 @@ class TempestResourcesContext(utils.RandomNameGeneratorMixin): def _create_network_resources(self): neutron_wrapper = network.NeutronWrapper(self.clients, self) + tenant_name = self.clients.keystone().tenant_name + tenant_id = self.clients.keystone().get_project_id(tenant_name) LOG.debug("Creating network resources: network, subnet, router") net = neutron_wrapper.create_network( - self.clients.keystone().tenant_id, subnets_num=1, - add_router=True, network_create_args={"shared": True}) + tenant_id, subnets_num=1, add_router=True, + network_create_args={"shared": True}) self._created_networks.append(net) return net