Remove troveclient from the direct dependency list

We don't even actually use troveclient in shade other than the
constructor. Make it an optional import.

Change-Id: I60b924eb8dfb48c53da0befb39cf84e6c1ea8863
This commit is contained in:
Monty Taylor 2017-01-31 13:38:08 -06:00
parent 28fc6b02fa
commit 1dfe5e54fb
4 changed files with 11 additions and 3 deletions

View File

@ -21,7 +21,6 @@ for lib in \
python-keystoneclient \
python-cinderclient \
python-neutronclient \
python-troveclient \
python-ironicclient \
python-heatclient \
python-designateclient \

View File

@ -0,0 +1,6 @@
---
upgrade:
- troveclient is no longer a hard dependency. Users
who were using shade to construct a troveclient
Client object should use os_client_config.make_legacy_client
instead.

View File

@ -15,7 +15,6 @@ python-novaclient>=2.21.0,!=2.27.0,!=2.32.0
python-keystoneclient>=0.11.0
python-cinderclient>=1.3.1
python-neutronclient>=2.3.10
python-troveclient>=1.2.0
python-ironicclient>=0.10.0
python-heatclient>=1.0.0
python-designateclient>=2.1.0

View File

@ -42,7 +42,6 @@ import magnumclient.client
import neutronclient.neutron.client
import novaclient.client
import novaclient.exceptions as nova_exceptions
import troveclient.client
import designateclient.client
from shade.exc import * # noqa
@ -1187,6 +1186,11 @@ class OpenStackCloud(_normalize.Normalizer):
@property
def trove_client(self):
warnings.warn(
'Using shade to get a trove_client object is deprecated. If you'
' need a raw troveclient.client.Client object, please use'
' make_legacy_client in os-client-config instead')
import troveclient.client
if self._trove_client is None:
self._trove_client = self._get_client(
'database', troveclient.client.Client)