diff options
author | Andrey Kurilin <akurilin@mirantis.com> | 2013-12-09 18:32:29 +0200 |
---|---|---|
committer | Andrey Kurilin <akurilin@mirantis.com> | 2013-12-09 18:50:12 +0200 |
commit | 24340329cf0abb03533920b6e71014c3a59da482 (patch) | |
tree | e6d82253294b22b2d47db1a25eab2bcbfa986486 /glanceclient/v1/client.py | |
parent | cd7f2cbd79df54ea41d9a075d904efc82bdcb440 (diff) | |
download | python-glanceclient-24340329cf0abb03533920b6e71014c3a59da482.tar.gz |
Replace inheritance hierarchy with composition
In the process of unification of the clients code we should use
composition to allow easier replacement with common HTTPClient.
Related to blueprint common-client-library-2
Change-Id: I5addc38eb2e2dd0be91b566fda7c0d81787ffa75
Diffstat (limited to 'glanceclient/v1/client.py')
-rw-r--r-- | glanceclient/v1/client.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/glanceclient/v1/client.py b/glanceclient/v1/client.py index d28b663..bc020b6 100644 --- a/glanceclient/v1/client.py +++ b/glanceclient/v1/client.py @@ -18,7 +18,7 @@ from glanceclient.v1 import images from glanceclient.v1 import image_members -class Client(http.HTTPClient): +class Client(object): """Client for the OpenStack Images v1 API. :param string endpoint: A user-supplied endpoint URL for the glance @@ -30,6 +30,6 @@ class Client(http.HTTPClient): def __init__(self, *args, **kwargs): """Initialize a new client for the Images v1 API.""" - super(Client, self).__init__(*args, **kwargs) - self.images = images.ImageManager(self) - self.image_members = image_members.ImageMemberManager(self) + self.http_client = http.HTTPClient(*args, **kwargs) + self.images = images.ImageManager(self.http_client) + self.image_members = image_members.ImageMemberManager(self.http_client) |