diff --git a/requirements.txt b/requirements.txt index 23ead37c4..8dfe53211 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,5 +20,6 @@ python-ironicclient>=0.10.0 python-swiftclient>=2.5.0 python-heatclient>=0.3.0 python-designateclient>=2.1.0 +python-magnumclient>=2.1.0 dogpile.cache>=0.5.3 diff --git a/shade/openstackcloud.py b/shade/openstackcloud.py index f86d4d141..0d2f2ff45 100644 --- a/shade/openstackcloud.py +++ b/shade/openstackcloud.py @@ -35,6 +35,7 @@ from heatclient.common import template_utils from heatclient import exc as heat_exceptions import keystoneauth1.exceptions import keystoneclient.client +import magnumclient.client import neutronclient.neutron.client import novaclient.client import novaclient.exceptions as nova_exceptions @@ -262,6 +263,7 @@ class OpenStackCloud(object): self._swift_service_lock = threading.Lock() self._trove_client = None self._designate_client = None + self._magnum_client = None self._raw_clients = {} @@ -856,6 +858,13 @@ class OpenStackCloud(object): 'database', troveclient.client.Client) return self._trove_client + @property + def magnum_client(self): + if self._magnum_client is None: + self._magnum_client = self._get_client( + 'container', magnumclient.client.Client) + return self._magnum_client + @property def neutron_client(self): if self._neutron_client is None: