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
(cherry picked from commit 7bd6a52066
)
This commit is contained in:
parent
1f577e41dd
commit
952c907262
|
@ -1734,10 +1734,6 @@ class TestGetDeploymentStatus(utils.TestCommand):
|
|||
status = {
|
||||
'workflow_status': {
|
||||
'payload': {
|
||||
'execution': {
|
||||
'created_at': 'yesterday',
|
||||
'updated_at': 'today'
|
||||
},
|
||||
'plan_name': 'testplan',
|
||||
'deployment_status': 'SUCCESS'
|
||||
}
|
||||
|
@ -1749,11 +1745,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())
|
||||
|
||||
|
|
|
@ -1055,12 +1055,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