summaryrefslogtreecommitdiff
path: root/glanceclient/v2/client.py
diff options
context:
space:
mode:
authorErno Kuvaja <jokke@usr.fi>2021-07-09 10:41:22 +0100
committerAbhishek Kekane <akekane@redhat.com>2022-02-22 16:39:33 +0000
commit62f4f67d1d3f1ad74418d1e8cd5bb946cc8425d9 (patch)
tree64a005802f6e5b7f85fe3bbe1679069e2da592b5 /glanceclient/v2/client.py
parent63bb03a145a7003a7e9ba40dd325995986fa953a (diff)
downloadpython-glanceclient-62f4f67d1d3f1ad74418d1e8cd5bb946cc8425d9.tar.gz
Add support for Cache API
This change provides support for the Cache API changes and deprecation path for glance-cache-manage command. Change-Id: I6fca9bbe6bc0bd9b14d8dba685405838131160af
Diffstat (limited to 'glanceclient/v2/client.py')
-rw-r--r--glanceclient/v2/client.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/glanceclient/v2/client.py b/glanceclient/v2/client.py
index 8b96bc7..8b8bd61 100644
--- a/glanceclient/v2/client.py
+++ b/glanceclient/v2/client.py
@@ -16,6 +16,7 @@
from glanceclient.common import http
from glanceclient.common import utils
+from glanceclient.v2 import cache
from glanceclient.v2 import image_members
from glanceclient.v2 import image_tags
from glanceclient.v2 import images
@@ -39,6 +40,7 @@ class Client(object):
"""
def __init__(self, endpoint=None, **kwargs):
+ self.endpoint_provided = endpoint is not None
endpoint, self.version = utils.endpoint_version_from_url(endpoint, 2.0)
self.http_client = http.get_http_client(endpoint=endpoint, **kwargs)
self.schemas = schemas.Controller(self.http_client)
@@ -69,3 +71,5 @@ class Client(object):
metadefs.NamespaceController(self.http_client, self.schemas))
self.versions = versions.VersionController(self.http_client)
+
+ self.cache = cache.Controller(self.http_client)