From ea061e8031a4b9176390820175c60f836311f2f6 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 16 Dec 2016 08:03:01 -0600 Subject: [PATCH] Add release notes and an error message for release In prepping for 1.14.0, it seemed there were a couple of important release notes missing, as well as an informative error message in case someone installs shade fresh and then tries to use glance_client. Change-Id: I17b8e7d3d1f6ac8172e49f4473137f51351f7e5d --- .../notes/fixed-magnum-type-7406f0a60525f858.yaml | 6 ++++++ .../notes/removed-glanceclient-105c7fba9481b9be.yaml | 9 +++++++++ shade/openstackcloud.py | 12 +++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fixed-magnum-type-7406f0a60525f858.yaml create mode 100644 releasenotes/notes/removed-glanceclient-105c7fba9481b9be.yaml diff --git a/releasenotes/notes/fixed-magnum-type-7406f0a60525f858.yaml b/releasenotes/notes/fixed-magnum-type-7406f0a60525f858.yaml new file mode 100644 index 000000000..bc0f768bd --- /dev/null +++ b/releasenotes/notes/fixed-magnum-type-7406f0a60525f858.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - Fixed magnum service_type. shade was using it as 'container' + but the correct type is 'container-infra'. It's possible that on + old clouds with magnum shade may now do the wrong thing. If that + occurs, please file a bug. diff --git a/releasenotes/notes/removed-glanceclient-105c7fba9481b9be.yaml b/releasenotes/notes/removed-glanceclient-105c7fba9481b9be.yaml new file mode 100644 index 000000000..78559f9a3 --- /dev/null +++ b/releasenotes/notes/removed-glanceclient-105c7fba9481b9be.yaml @@ -0,0 +1,9 @@ +--- +prelude: > + This release marks the beginning of the path towards removing all + of the 'python-*client' libraries as dependencies. Subsequent releases + should expect to have fewer and fewer library depdencies. +upgrade: + - Removed glanceclient as a dependency. All glance operations + are now performed with direct REST calls using keystoneauth + Adapter. diff --git a/shade/openstackcloud.py b/shade/openstackcloud.py index 807beadaf..1f7324574 100644 --- a/shade/openstackcloud.py +++ b/shade/openstackcloud.py @@ -993,7 +993,17 @@ class OpenStackCloud(_normalize.Normalizer): @property def glance_client(self): - import glanceclient + warnings.warn( + 'Using shade to get a glance_client object is deprecated. If you' + ' need a raw glanceclient.Client object, please use' + ' make_legacy_client in os-client-config instead') + try: + import glanceclient + except ImportError: + self.log.error( + 'glanceclient is no longer a dependency of shade. You need to' + ' install python-glanceclient directly.') + raise if self._glance_client is None: self._glance_client = self._get_client( 'image', glanceclient.Client)