From 27e0c73571355b0544a94061e75a9d77b70369a2 Mon Sep 17 00:00:00 2001 From: Srinivas Sakhamuri Date: Fri, 12 Feb 2016 10:42:55 -0700 Subject: [PATCH] Fix quotas to use the supplied context If the task specifies api_versions context at present, it doesn't get used in context setup and defaults to hard-coded value from osclients.py, this fix will pass the config to osclient which constructs correct versioned client Change-Id: I9daa7e55c51c325b0cbe11b8520f47a917470e74 --- rally/plugins/openstack/context/quotas/quotas.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rally/plugins/openstack/context/quotas/quotas.py b/rally/plugins/openstack/context/quotas/quotas.py index c47fe457..e2fb2cd9 100644 --- a/rally/plugins/openstack/context/quotas/quotas.py +++ b/rally/plugins/openstack/context/quotas/quotas.py @@ -47,7 +47,9 @@ class Quotas(context.Context): def __init__(self, ctx): super(Quotas, self).__init__(ctx) - self.clients = osclients.Clients(self.context["admin"]["credential"]) + self.clients = osclients.Clients( + self.context["admin"]["credential"], + api_info=self.context["config"].get("api_versions")) self.manager = { "nova": nova_quotas.NovaQuotas(self.clients),