Merge "[trivial] fix several minor issues"
This commit is contained in:
commit
58e2949cdc
@ -25,6 +25,7 @@ from .deployment_group import DeploymentGroup
|
|||||||
from .deployment_group import Stage
|
from .deployment_group import Stage
|
||||||
from .errors import DeploymentGroupCycleError
|
from .errors import DeploymentGroupCycleError
|
||||||
from .errors import DeploymentGroupStageError
|
from .errors import DeploymentGroupStageError
|
||||||
|
from .errors import DeploymentGroupSuccessProcessingError
|
||||||
from .errors import UnknownDeploymentGroupError
|
from .errors import UnknownDeploymentGroupError
|
||||||
from .errors import UnknownNodeError
|
from .errors import UnknownNodeError
|
||||||
|
|
||||||
@ -122,6 +123,12 @@ class DeploymentGroupManager:
|
|||||||
LOG.info("Group %s has met its success criteria and is "
|
LOG.info("Group %s has met its success criteria and is "
|
||||||
"now set to stage %s", group_name, stage)
|
"now set to stage %s", group_name, stage)
|
||||||
return True
|
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):
|
def report_group_summary(self):
|
||||||
"""Reports the status of all groups handled by this deployment"""
|
"""Reports the status of all groups handled by this deployment"""
|
||||||
|
@ -56,6 +56,15 @@ class DeploymentGroupStageError(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class DeploymentGroupSuccessProcessingError(Exception):
|
||||||
|
"""DeploymentGroupSuccessProcessingError
|
||||||
|
|
||||||
|
Raised when success processing has been provided with an invalid scenario
|
||||||
|
to validate
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class UnknownDeploymentGroupError(Exception):
|
class UnknownDeploymentGroupError(Exception):
|
||||||
"""UnknownDeploymentGroupError
|
"""UnknownDeploymentGroupError
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class ValidateDeploymentConfiguration(DocumentValidator):
|
|||||||
error=False,
|
error=False,
|
||||||
level="Info",
|
level="Info",
|
||||||
message=("A deployment strategy document was not specified in "
|
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.")
|
"strategy used will be all-at-once.")
|
||||||
))
|
))
|
||||||
LOG.info("No deployment strategy document specified, "
|
LOG.info("No deployment strategy document specified, "
|
||||||
|
@ -281,7 +281,6 @@ class DrydockBaseOperator(UcpBaseOperator):
|
|||||||
try:
|
try:
|
||||||
return self.drydock_client.get_task(task_id=task_id)
|
return self.drydock_client.get_task(task_id=task_id)
|
||||||
except errors.ClientError as client_error:
|
except errors.ClientError as client_error:
|
||||||
# Dump logs from Drydock pods
|
|
||||||
raise DrydockClientUseFailureException(client_error)
|
raise DrydockClientUseFailureException(client_error)
|
||||||
|
|
||||||
def task_failure(self, _task_failure):
|
def task_failure(self, _task_failure):
|
||||||
|
@ -189,7 +189,7 @@ class DrydockNodesOperator(DrydockBaseOperator):
|
|||||||
"""Execute the Drydock task requested
|
"""Execute the Drydock task requested
|
||||||
|
|
||||||
:param task_name: 'prepare_nodes', 'deploy_nodes'
|
: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
|
:param timeout: The total time allowed for the task
|
||||||
|
|
||||||
Wraps the query_task method in the base class, capturing
|
Wraps the query_task method in the base class, capturing
|
||||||
|
Loading…
Reference in New Issue
Block a user