fix rally
Change-Id: Ic8048b6e36afce2863228e74a3827bccae24109a
This commit is contained in:
parent
e22e6a1bc0
commit
400f130485
|
@ -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:
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue