Add action field for snapshot
Depends-on: https://review.opendev.org/c/openstack/heat/+/976858 Change-Id: Iba70733e8b66755db05b86170b78160d45721f1a Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -52,7 +52,14 @@ class ListSnapshot(command.Lister):
|
||||
raise exc.CommandError(_('Stack not found: %s') %
|
||||
parsed_args.stack)
|
||||
|
||||
columns = ['id', 'name', 'status', 'status_reason', 'creation_time']
|
||||
columns = [
|
||||
'id',
|
||||
'name',
|
||||
'action',
|
||||
'status',
|
||||
'status_reason',
|
||||
'creation_time'
|
||||
]
|
||||
return (
|
||||
columns,
|
||||
(utils.get_dict_properties(s, columns)
|
||||
@@ -168,6 +175,7 @@ class CreateSnapshot(command.ShowOne):
|
||||
columns = [
|
||||
'ID',
|
||||
'name',
|
||||
'action',
|
||||
'status',
|
||||
'status_reason',
|
||||
'data',
|
||||
|
||||
@@ -101,6 +101,7 @@ class TestRestoreSnapshot(TestStack):
|
||||
|
||||
class TestSnapshotCreate(TestStack):
|
||||
get_response = {
|
||||
"action": "CREATE",
|
||||
"status": "IN_PROGRESS",
|
||||
"name": "test_snapshot",
|
||||
"status_reason": None,
|
||||
|
||||
@@ -2124,6 +2124,7 @@ class ShellTestUserPass(ShellBase):
|
||||
resp_dict = {"snapshots": [{
|
||||
"id": "2",
|
||||
"name": "snap1",
|
||||
"action": "CREATE",
|
||||
"status": "COMPLETE",
|
||||
"status_reason": "",
|
||||
"creation_time": "2014-12-05T01:25:52Z"
|
||||
@@ -2136,6 +2137,7 @@ class ShellTestUserPass(ShellBase):
|
||||
required = [
|
||||
'id',
|
||||
'name',
|
||||
'action',
|
||||
'status',
|
||||
'status_reason',
|
||||
'creation_time',
|
||||
|
||||
@@ -1684,10 +1684,13 @@ def do_snapshot_list(hc, args):
|
||||
except exc.HTTPNotFound:
|
||||
raise exc.CommandError(_('Stack not found: %s') % args.id)
|
||||
else:
|
||||
fields = ['id', 'name', 'status', 'status_reason', 'creation_time']
|
||||
fields = [
|
||||
'id', 'name', 'action', 'status', 'status_reason', 'creation_time'
|
||||
]
|
||||
formatters = {
|
||||
'id': lambda x: x['id'],
|
||||
'name': lambda x: x['name'],
|
||||
'action': lambda x: x['action'],
|
||||
'status': lambda x: x['status'],
|
||||
'status_reason': lambda x: x['status_reason'],
|
||||
'creation_time': lambda x: x['creation_time'],
|
||||
|
||||
7
releasenotes/notes/snapshot-action-a8ead3d9d0285a54.yaml
Normal file
7
releasenotes/notes/snapshot-action-a8ead3d9d0285a54.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The follwoing commands now shows the new `action` field.
|
||||
|
||||
- ``openstack stack snapshot list <stack>``
|
||||
- ``openstack stack snapshot show <stack> <snapshot>``
|
||||
Reference in New Issue
Block a user