diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 0a9f9102..73c2e570 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -23,6 +23,7 @@ import logging from openstackclient.common import exceptions as exc from openstackclient.compute import client as compute_client from openstackclient.identity import client as identity_client +from openstackclient.image import client as image_client LOG = logging.getLogger(__name__) @@ -46,8 +47,9 @@ class ClientManager(object): """Manages access to API clients, including authentication. """ - identity = ClientCache(identity_client.make_client) compute = ClientCache(compute_client.make_client) + identity = ClientCache(identity_client.make_client) + image = ClientCache(image_client.make_client) def __init__(self, token=None, url=None, auth_url=None, diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py index ea8170bc..70555be5 100644 --- a/openstackclient/common/utils.py +++ b/openstackclient/common/utils.py @@ -125,6 +125,6 @@ def get_client_class(api_name, version, version_map): except (KeyError, ValueError): msg = "Invalid %s client version '%s'. must be one of: %s" % ( (api_name, version, ', '.join(version_map.keys()))) - raise exc.UnsupportedVersion(msg) + raise exceptions.UnsupportedVersion(msg) return import_class(client_path) diff --git a/setup.py b/setup.py index 7dde53f2..df9fefff 100644 --- a/setup.py +++ b/setup.py @@ -110,6 +110,9 @@ setuptools.setup( 'set_user=openstackclient.identity.v2_0.user:SetUser', 'show_user=openstackclient.identity.v2_0.user:ShowUser', 'list_user-role=openstackclient.identity.v2_0.role:ListUserRole', + 'list_image=openstackclient.image.v2.image:ListImage', + 'show_image=openstackclient.image.v2.image:ShowImage', + 'save_image=openstackclient.image.v2.image:SaveImage', ] } )