diff options
author | Jamie Lennox <jamielennox@redhat.com> | 2014-07-04 09:09:18 +1000 |
---|---|---|
committer | Jamie Lennox <jamielennox@redhat.com> | 2014-11-21 08:03:23 +1000 |
commit | b0e68b06b3c5da2da4307bd172708317d8b0428c (patch) | |
tree | 9223b536f6111b8625e02a994bb439ceb033e9c4 /keystoneclient/base.py | |
parent | b71a0a22c54e91a1c0058e4b29973df4154478f6 (diff) | |
download | python-keystoneclient-b0e68b06b3c5da2da4307bd172708317d8b0428c.tar.gz |
Make keystoneclient use an adapter
Apart from making keystoneclient follow the same patterns of using an
adapter that we are trying to push onto other clients this severs the
cyclical dependency between managers and the client object.
There are a few changes that have had to be rolled into one to make the
transition work. These can't be separated unfortunately as they are
interdependent.
* managers are now passed the adapter instead of the client. They
therefore don't have reference to the other managers on the client.
* The adapter has been subclassed to provide user_id as there are some
managers that require user_id be provided for changing passwords etc.
* client.auth_url has been replaced with a call to get_endpoint which is
supported by the adapter.
* management=True has been removed from all the managers and they now
correctly set the interface they want.
Change-Id: I49fbd50571f0c1484e1cbc3dcb2159d25b21b1bc
Diffstat (limited to 'keystoneclient/base.py')
-rw-r--r-- | keystoneclient/base.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/keystoneclient/base.py b/keystoneclient/base.py index 030afef..316b79e 100644 --- a/keystoneclient/base.py +++ b/keystoneclient/base.py @@ -211,13 +211,12 @@ class Manager(object): return self.client.delete(url, **kwargs) def _update(self, url, body=None, response_key=None, method="PUT", - management=True, **kwargs): + **kwargs): methods = {"PUT": self.client.put, "POST": self.client.post, "PATCH": self.client.patch} try: resp, body = methods[method](url, body=body, - management=management, **kwargs) except KeyError: raise exceptions.ClientException(_("Invalid update method: %s") |