From 400f1304857211632f4e562819791e35330d4206 Mon Sep 17 00:00:00 2001 From: Andrey Pavlov Date: Mon, 14 Dec 2015 18:03:51 +0300 Subject: [PATCH] fix rally Change-Id: Ic8048b6e36afce2863228e74a3827bccae24109a --- rally-scenarios/plugins/context_plugin_ec2_creds.py | 6 +++--- rally-scenarios/plugins/context_plugin_images.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rally-scenarios/plugins/context_plugin_ec2_creds.py b/rally-scenarios/plugins/context_plugin_ec2_creds.py index 67a1aa57..4fca3a12 100644 --- a/rally-scenarios/plugins/context_plugin_ec2_creds.py +++ b/rally-scenarios/plugins/context_plugin_ec2_creds.py @@ -31,8 +31,8 @@ class PrepareEC2ClientContext(context.Context): def __init__(self, ctx): super(PrepareEC2ClientContext, self).__init__(ctx) self.net_wrapper = network_wrapper.wrap( - osclients.Clients(self.context["admin"]["endpoint"]), - self.config) + osclients.Clients(self.context["admin"]["credential"]), + self, config=self.config) self.net_wrapper.start_cidr = '10.0.0.0/16' @logging.log_task_wrapper(LOG.info, _("Enter context: `EC2 creds`")) @@ -40,7 +40,7 @@ class PrepareEC2ClientContext(context.Context): """This method is called before the task start.""" try: for user in self.context['users']: - osclient = osclients.Clients(user['endpoint']) + osclient = osclients.Clients(user['credential']) keystone = osclient.keystone() creds = keystone.ec2.list(user['id']) if not creds: diff --git a/rally-scenarios/plugins/context_plugin_images.py b/rally-scenarios/plugins/context_plugin_images.py index 301df175..8b75cfc7 100644 --- a/rally-scenarios/plugins/context_plugin_images.py +++ b/rally-scenarios/plugins/context_plugin_images.py @@ -55,7 +55,7 @@ class FakeImageGenerator(context.Context): for user, tenant_id in rutils.iterate_per_tenants( self.context["users"]): - glance = osclients.Clients(user["endpoint"]).glance().images + glance = osclients.Clients(user["credential"]).glance().images current_images = [] for i in range(images_per_tenant): kw = { @@ -73,7 +73,7 @@ class FakeImageGenerator(context.Context): def cleanup(self): for user, tenant_id in rutils.iterate_per_tenants( self.context["users"]): - glance = osclients.Clients(user["endpoint"]).glance().images + glance = osclients.Clients(user["credential"]).glance().images for image in self.context["tenants"][tenant_id].get("images", []): with logging.ExceptionLogger( LOG,