From 44c97cc099a35af2d3d999f9799238fc72be071d Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Tue, 27 Aug 2013 16:57:30 -0500 Subject: Add Identity v2 role and service tests * Add current auth info (auth_ref) to ClientManager * Fix identity.v2_0.role.ListUserRole to get default user/project from ClientManager.auth_ref * Fix identity.v2_0.role.AddRole call to roles.add_user_role() Change-Id: Ie8bf41c491d97b0292a2b86bdc9b7580989a7f97 --- openstackclient/common/clientmanager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'openstackclient/common') diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 690cabba..24b09beb 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -1,4 +1,4 @@ -# Copyright 2012-2013 OpenStack, LLC. +# Copyright 2012-2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain @@ -62,8 +62,11 @@ class ClientManager(object): self._api_version = api_version self._service_catalog = None + self.auth_ref = None + if not self._url: # Populate other password flow attributes + self.auth_ref = self.identity.auth_ref self._token = self.identity.auth_token self._service_catalog = self.identity.service_catalog -- cgit v1.2.1