Merge "Remove invalid mistral envocation and references"
This commit is contained in:
commit
6fdbc01009
@ -130,7 +130,6 @@ class DeploymentStatusAction(base.TripleOAction):
|
|||||||
|
|
||||||
def run(self, context):
|
def run(self, context):
|
||||||
orchestration_client = self.get_orchestration_client(context)
|
orchestration_client = self.get_orchestration_client(context)
|
||||||
workflow_client = self.get_workflow_client(context)
|
|
||||||
swift_client = self.get_object_client(context)
|
swift_client = self.get_object_client(context)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -154,15 +153,6 @@ class DeploymentStatusAction(base.TripleOAction):
|
|||||||
# Will get set to new status if an update is required
|
# Will get set to new status if an update is required
|
||||||
status_update = None
|
status_update = None
|
||||||
|
|
||||||
cd_execs = workflow_client.executions.find(
|
|
||||||
workflow_name='tripleo.deployment.v1.config_download_deploy')
|
|
||||||
cd_execs.sort(key=lambda x: x.updated_at)
|
|
||||||
if cd_execs:
|
|
||||||
cd_exec = workflow_client.executions.get(cd_execs[-1].id)
|
|
||||||
cd_status = cd_exec.state
|
|
||||||
ansible_status = json.loads(
|
|
||||||
cd_exec.output).get('deployment_status')
|
|
||||||
|
|
||||||
def update_status(status):
|
def update_status(status):
|
||||||
# If we need to update the status return it
|
# If we need to update the status return it
|
||||||
if deployment_status != status:
|
if deployment_status != status:
|
||||||
|
@ -103,7 +103,7 @@ class DeletePlanAction(base.TripleOAction):
|
|||||||
class ListRolesAction(base.TripleOAction):
|
class ListRolesAction(base.TripleOAction):
|
||||||
"""Returns a deployment plan's roles
|
"""Returns a deployment plan's roles
|
||||||
|
|
||||||
DEPRECATED, please use tripleo.plan_management.v1.list_roles workflow
|
DEPRECATED
|
||||||
|
|
||||||
Parses roles_data.yaml and returns the names of all available roles.
|
Parses roles_data.yaml and returns the names of all available roles.
|
||||||
|
|
||||||
|
@ -142,7 +142,6 @@ class DeploymentStatusActionTest(base.TestCase):
|
|||||||
result = action.run(self.ctx)
|
result = action.run(self.ctx)
|
||||||
|
|
||||||
self.assertEqual(result['stack_status'], 'COMPLETE')
|
self.assertEqual(result['stack_status'], 'COMPLETE')
|
||||||
self.assertEqual(result['cd_status'], 'SUCCESS')
|
|
||||||
self.assertEqual(result['deployment_status'], 'DEPLOY_SUCCESS')
|
self.assertEqual(result['deployment_status'], 'DEPLOY_SUCCESS')
|
||||||
self.assertEqual(result['status_update'], None)
|
self.assertEqual(result['status_update'], None)
|
||||||
|
|
||||||
@ -173,7 +172,6 @@ class DeploymentStatusActionTest(base.TestCase):
|
|||||||
result = action.run(self.ctx)
|
result = action.run(self.ctx)
|
||||||
|
|
||||||
self.assertEqual(result['stack_status'], 'FAILED')
|
self.assertEqual(result['stack_status'], 'FAILED')
|
||||||
self.assertEqual(result['cd_status'], 'SUCCESS')
|
|
||||||
self.assertEqual(result['deployment_status'], 'DEPLOY_SUCCESS')
|
self.assertEqual(result['deployment_status'], 'DEPLOY_SUCCESS')
|
||||||
self.assertEqual(result['status_update'], 'DEPLOY_FAILED')
|
self.assertEqual(result['status_update'], 'DEPLOY_FAILED')
|
||||||
|
|
||||||
@ -204,7 +202,6 @@ class DeploymentStatusActionTest(base.TestCase):
|
|||||||
result = action.run(self.ctx)
|
result = action.run(self.ctx)
|
||||||
|
|
||||||
self.assertEqual(result['stack_status'], 'IN_PROGRESS')
|
self.assertEqual(result['stack_status'], 'IN_PROGRESS')
|
||||||
self.assertEqual(result['cd_status'], 'SUCCESS')
|
|
||||||
self.assertEqual(result['deployment_status'], 'DEPLOY_SUCCESS')
|
self.assertEqual(result['deployment_status'], 'DEPLOY_SUCCESS')
|
||||||
self.assertEqual(result['status_update'], 'DEPLOYING')
|
self.assertEqual(result['status_update'], 'DEPLOYING')
|
||||||
|
|
||||||
@ -235,9 +232,7 @@ class DeploymentStatusActionTest(base.TestCase):
|
|||||||
result = action.run(self.ctx)
|
result = action.run(self.ctx)
|
||||||
|
|
||||||
self.assertEqual(result['stack_status'], 'COMPLETE')
|
self.assertEqual(result['stack_status'], 'COMPLETE')
|
||||||
self.assertEqual(result['cd_status'], 'SUCCESS')
|
|
||||||
self.assertEqual(result['deployment_status'], 'DEPLOYING')
|
self.assertEqual(result['deployment_status'], 'DEPLOYING')
|
||||||
self.assertEqual(result['status_update'], 'DEPLOY_SUCCESS')
|
|
||||||
|
|
||||||
@mock.patch('tripleo_common.actions.base.TripleOAction.'
|
@mock.patch('tripleo_common.actions.base.TripleOAction.'
|
||||||
'get_object_client')
|
'get_object_client')
|
||||||
@ -266,9 +261,7 @@ class DeploymentStatusActionTest(base.TestCase):
|
|||||||
result = action.run(self.ctx)
|
result = action.run(self.ctx)
|
||||||
|
|
||||||
self.assertEqual(result['stack_status'], 'COMPLETE')
|
self.assertEqual(result['stack_status'], 'COMPLETE')
|
||||||
self.assertEqual(result['cd_status'], 'SUCCESS')
|
|
||||||
self.assertEqual(result['deployment_status'], 'DEPLOYING')
|
self.assertEqual(result['deployment_status'], 'DEPLOYING')
|
||||||
self.assertEqual(result['status_update'], 'DEPLOY_FAILED')
|
|
||||||
|
|
||||||
@mock.patch('tripleo_common.actions.base.TripleOAction.'
|
@mock.patch('tripleo_common.actions.base.TripleOAction.'
|
||||||
'get_object_client')
|
'get_object_client')
|
||||||
|
Loading…
Reference in New Issue
Block a user