Merge "Enable swact in USM deploy abort/rollback scenario"
This commit is contained in:
commit
5ec2d6822a
@ -6196,13 +6196,16 @@ class HostController(rest.RestController):
|
||||
|
||||
if isinstance(upgrade, usm_service.UsmUpgrade):
|
||||
to_host_deploy = usm_service.get_host_deploy(pecan.request.dbapi, to_host['hostname'])
|
||||
if to_host_deploy['host_state'] == constants.DEPLOY_HOST_DEPLOYED:
|
||||
if to_host_deploy['host_state'] in [constants.DEPLOY_HOST_DEPLOYED,
|
||||
constants.DEPLOY_HOST_ROLLBACK_DEPLOYED]:
|
||||
# to host has deployed
|
||||
pass
|
||||
else:
|
||||
from_host_deploy = usm_service.get_host_deploy(pecan.request.dbapi, from_host['hostname'])
|
||||
if from_host_deploy['host_state'] == constants.DEPLOY_HOST_PENDING and \
|
||||
to_host_deploy['host_state'] == constants.DEPLOY_HOST_PENDING:
|
||||
if from_host_deploy['host_state'] in [constants.DEPLOY_HOST_PENDING,
|
||||
constants.DEPLOY_HOST_ROLLBACK_PENDING] and \
|
||||
to_host_deploy['host_state'] in [constants.DEPLOY_HOST_PENDING,
|
||||
constants.DEPLOY_HOST_ROLLBACK_PENDING]:
|
||||
# no host has started deploy yet
|
||||
pass
|
||||
else:
|
||||
|
@ -2590,9 +2590,12 @@ ISSUER = "Issuer"
|
||||
# USM deploy state
|
||||
DEPLOY_STATE_HOST = 'host' # host is being deploy
|
||||
DEPLOY_STATE_HOST_FAILED = 'host-failed' # host deployment failed
|
||||
|
||||
# USM deploy host state
|
||||
DEPLOY_HOST_PENDING = 'pending' # host is pending for new deployment
|
||||
DEPLOY_HOST_DEPLOYED = 'deployed' # new software is deployed to the host
|
||||
DEPLOY_HOST_ROLLBACK_PENDING = 'rollback-pending' # host is pending for rollback
|
||||
DEPLOY_HOST_ROLLBACK_DEPLOYED = 'rollback-deployed' # rollback release is deployed to the host
|
||||
|
||||
# API operations
|
||||
API_POST = 'post'
|
||||
|
Loading…
Reference in New Issue
Block a user