From 02e4d1dc85ff91c37af23a2660c23c95113f159c Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Mon, 9 Nov 2015 18:56:19 +0100 Subject: [PATCH] Add initial setup for magnum in shade Start by adding the client, following same structure as the other ones. Change-Id: I499f9fdda08743f7b67afcc1c2f9b07df471a041 --- requirements.txt | 1 + shade/openstackcloud.py | 9 +++++++++ 2 files changed, 10 insertions(+) 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: