From 695d025f0028dae2715096b53629f1a00810d270 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 17 Oct 2024 16:25:13 +0200 Subject: [PATCH] Show Created At column for volume backups in v3 The change in [1] erroneously only added the created_at column for volume v2 API and not also for the volume v3 API. [1] https://review.opendev.org/c/openstack/python-openstackclient/+/920003 Change-Id: Iae0b4f21cbc31ae7464a79c8f5e01446ca4ff098 --- openstackclient/tests/unit/volume/v3/test_volume_backup.py | 3 +++ openstackclient/volume/v3/volume_backup.py | 2 ++ .../volume-backup-created-at-list-v3-47400b31be5143bc.yaml | 5 +++++ 3 files changed, 10 insertions(+) create mode 100644 releasenotes/notes/volume-backup-created-at-list-v3-47400b31be5143bc.yaml diff --git a/openstackclient/tests/unit/volume/v3/test_volume_backup.py b/openstackclient/tests/unit/volume/v3/test_volume_backup.py index d4e7e79248..864f162414 100644 --- a/openstackclient/tests/unit/volume/v3/test_volume_backup.py +++ b/openstackclient/tests/unit/volume/v3/test_volume_backup.py @@ -333,6 +333,7 @@ class TestBackupList(volume_fakes.TestVolume): 'Status', 'Size', 'Incremental', + 'Created At', ) columns_long = columns + ( 'Availability Zone', @@ -350,6 +351,7 @@ class TestBackupList(volume_fakes.TestVolume): b.status, b.size, b.is_incremental, + b.created_at, ) ) data_long = [] @@ -362,6 +364,7 @@ class TestBackupList(volume_fakes.TestVolume): b.status, b.size, b.is_incremental, + b.created_at, b.availability_zone, volume_backup.VolumeIdColumn(b.volume_id), b.container, diff --git a/openstackclient/volume/v3/volume_backup.py b/openstackclient/volume/v3/volume_backup.py index 471b4cee14..45d50b8437 100644 --- a/openstackclient/volume/v3/volume_backup.py +++ b/openstackclient/volume/v3/volume_backup.py @@ -305,6 +305,7 @@ class ListVolumeBackup(command.Lister): 'status', 'size', 'is_incremental', + 'created_at', ) column_headers = ( 'ID', @@ -313,6 +314,7 @@ class ListVolumeBackup(command.Lister): 'Status', 'Size', 'Incremental', + 'Created At', ) if parsed_args.long: columns += ('availability_zone', 'volume_id', 'container') diff --git a/releasenotes/notes/volume-backup-created-at-list-v3-47400b31be5143bc.yaml b/releasenotes/notes/volume-backup-created-at-list-v3-47400b31be5143bc.yaml new file mode 100644 index 0000000000..88aa7143fa --- /dev/null +++ b/releasenotes/notes/volume-backup-created-at-list-v3-47400b31be5143bc.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Listing volume backups now shows the created_at column when + volume v3 API is used.