Don't look for execution in payload
We don't seem to send the execution object anymore after https://review.opendev.org/#/c/630291/. Though we've execution_id, it probably does not make sense to make mistral api call to get the created/updated timestamps. Change-Id: I11f500165026455d8d41fd07901357fc91d8a359 Closes-Bug: #1832511
This commit is contained in:
parent
53d0237c8c
commit
7bd6a52066
|
@ -1730,10 +1730,6 @@ class TestGetDeploymentStatus(utils.TestCommand):
|
|||
status = {
|
||||
'workflow_status': {
|
||||
'payload': {
|
||||
'execution': {
|
||||
'created_at': 'yesterday',
|
||||
'updated_at': 'today'
|
||||
},
|
||||
'plan_name': 'testplan',
|
||||
'deployment_status': 'SUCCESS'
|
||||
}
|
||||
|
@ -1745,11 +1741,11 @@ class TestGetDeploymentStatus(utils.TestCommand):
|
|||
self.cmd.take_action(parsed_args)
|
||||
|
||||
expected = (
|
||||
'+-----------+-----------+---------+-------------------+\n'
|
||||
'| Plan Name | Created | Updated | Deployment Status |\n'
|
||||
'+-----------+-----------+---------+-------------------+\n'
|
||||
'| testplan | yesterday | today | SUCCESS |\n'
|
||||
'+-----------+-----------+---------+-------------------+\n')
|
||||
'+-----------+-------------------+\n'
|
||||
'| Plan Name | Deployment Status |\n'
|
||||
'+-----------+-------------------+\n'
|
||||
'| testplan | SUCCESS |\n'
|
||||
'+-----------+-------------------+\n')
|
||||
|
||||
self.assertEqual(expected, self.cmd.app.stdout.getvalue())
|
||||
|
||||
|
|
|
@ -1029,12 +1029,9 @@ class GetDeploymentStatus(command.Command):
|
|||
return
|
||||
|
||||
payload = status['workflow_status']['payload']
|
||||
execution = payload['execution']
|
||||
table = PrettyTable(
|
||||
['Plan Name', 'Created', 'Updated', 'Deployment Status'])
|
||||
['Plan Name', 'Deployment Status'])
|
||||
table.add_row([payload['plan_name'],
|
||||
execution['created_at'],
|
||||
execution['updated_at'],
|
||||
payload['deployment_status']])
|
||||
print(table, file=self.app.stdout)
|
||||
|
||||
|
|
Loading…
Reference in New Issue