Update criteria to determine if stx-openstack is installed
The current check to determine if the stx-openstack application is installed just checks for the APP_APPLY_SUCCESS status. However, the application can be re-applied (either manually or automatically when a host is unlocked) and can then transition to the APP_APPLY_IN_PROGRESS or APP_APPLY_FAILURE status. Updating the check to account for these two additional status, which also indicate that the stx-openstack application is installed. Change-Id: I02e92eb5bcbc70c7802e4e46dc608fc08c86b1c6 story: 2002843 task: 29361 Signed-off-by: Bart Wensley <barton.wensley@windriver.com>
This commit is contained in:
parent
f8345ab079
commit
4bb0586db2
|
@ -1785,7 +1785,13 @@ def is_openstack_installed(dbapi):
|
|||
""" Checks whether the OpenStack application is installed. """
|
||||
try:
|
||||
openstack_app = dbapi.kube_app_get(constants.HELM_APP_OPENSTACK)
|
||||
if openstack_app.status == constants.APP_APPLY_SUCCESS:
|
||||
# The application can be re-applied (either manually or as a result of
|
||||
# a host unlock, so it will cycle through the APP_APPLY_IN_PROGRESS
|
||||
# status and possibly the APP_APPLY_FAILURE status, but still be
|
||||
# installed.
|
||||
if openstack_app.status in [constants.APP_APPLY_SUCCESS,
|
||||
constants.APP_APPLY_IN_PROGRESS,
|
||||
constants.APP_APPLY_FAILURE]:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue