Bump reqirements to tripleo-common>=16.0.0

Now that tripleo-common==16.0.0 is released, we can require it in
tripleo-ansibl. The release contains
https://review.opendev.org/c/openstack/tripleo-common/+/787819
so we can remove the try/except import handling.

Change-Id: I1fc7fa702d56edc9d55acf6647f15b5665e5605b
Signed-off-by: James Slagle <jslagle@redhat.com>
This commit is contained in:
James Slagle 2021-04-29 09:29:03 -04:00
parent c72a83c30c
commit caefa59299
2 changed files with 4 additions and 11 deletions

View File

@ -1,5 +1,5 @@
pbr>=1.6
tripleo-common # Apache-2.0
tripleo-common>=16.0.0 # Apache-2.0
python-glanceclient>=2.8.0 # Apache-2.0
python-heatclient # Apache-2.0
python-ironicclient!=2.5.2,!=2.7.1,!=3.0.0,>=2.3.0,<4.0.0;python_version=='2.7' # Apache-2.0

View File

@ -27,19 +27,12 @@ from ironicclient import client as ironicclient
from novaclient import client as novaclient
from swiftclient import client as swift_client
from tripleo_common.utils import heat as tc_heat_utils
from tripleo_common.utils import nodes
from tripleo_common.utils import parameters
import ironic_inspector_client
try:
# TODO(slagle): the try/except can be removed once tripleo_common is
# released with
# https://review.opendev.org/c/openstack/tripleo-common/+/787819
from tripleo_common.utils import heat
except ImportError:
heat = None
class DeriveParamsError(Exception):
"""Error while performing a derive parameters operation"""
@ -84,11 +77,11 @@ class TripleOCommon(object):
if 'heatclient' in self.client_cache:
return self.client_cache['heatclient']
else:
if heat and os.environ.get('OS_HEAT_TYPE', '') == 'ephemeral':
if os.environ.get('OS_HEAT_TYPE', '') == 'ephemeral':
host = os.environ.get('OS_HEAT_HOST', '127.0.0.1')
port = os.environ.get('OS_HEAT_PORT', 8006)
self.client_cache['heatclient'] = \
heat.local_orchestration_client(host, int(port))
tc_heat_utils.local_orchestration_client(host, int(port))
else:
self.client_cache['heatclient'] = \
heatclient.Client(session=self.sess)