Merge "[trivial] fix several minor issues"

changes/97/577897/1
Zuul 5 years ago committed by Gerrit Code Review
commit 58e2949cdc

@ -25,6 +25,7 @@ from .deployment_group import DeploymentGroup
from .deployment_group import Stage
from .errors import DeploymentGroupCycleError
from .errors import DeploymentGroupStageError
from .errors import DeploymentGroupSuccessProcessingError
from .errors import UnknownDeploymentGroupError
from .errors import UnknownNodeError
@ -122,6 +123,12 @@ class DeploymentGroupManager:
LOG.info("Group %s has met its success criteria and is "
"now set to stage %s", group_name, stage)
return True
# Any other cases are invalid.
raise DeploymentGroupSuccessProcessingError(
"Group {} has no failures, but is in an invalid state {}".format(
group_name, stage
)
)
def report_group_summary(self):
"""Reports the status of all groups handled by this deployment"""

@ -56,6 +56,15 @@ class DeploymentGroupStageError(Exception):
pass
class DeploymentGroupSuccessProcessingError(Exception):
"""DeploymentGroupSuccessProcessingError
Raised when success processing has been provided with an invalid scenario
to validate
"""
pass
class UnknownDeploymentGroupError(Exception):
"""UnknownDeploymentGroupError

@ -48,7 +48,7 @@ class ValidateDeploymentConfiguration(DocumentValidator):
error=False,
level="Info",
message=("A deployment strategy document was not specified in "
"the deployment configuration. Beacuse of this, the "
"the deployment configuration. Because of this, the "
"strategy used will be all-at-once.")
))
LOG.info("No deployment strategy document specified, "

@ -281,7 +281,6 @@ class DrydockBaseOperator(UcpBaseOperator):
try:
return self.drydock_client.get_task(task_id=task_id)
except errors.ClientError as client_error:
# Dump logs from Drydock pods
raise DrydockClientUseFailureException(client_error)
def task_failure(self, _task_failure):

@ -189,7 +189,7 @@ class DrydockNodesOperator(DrydockBaseOperator):
"""Execute the Drydock task requested
:param task_name: 'prepare_nodes', 'deploy_nodes'
;param interval: The time between checking status on the task
:param interval: The time between checking status on the task
:param timeout: The total time allowed for the task
Wraps the query_task method in the base class, capturing

Loading…
Cancel
Save