Add is_incremental to ListVolumeBackup
It's of interest which backups are incremental or full. Returning this information as a column to the list of backups. Change-Id: I766330228634d5db678df11c23877077a3635372
This commit is contained in:
parent
619925e45f
commit
98b949646c
openstackclient
@ -520,6 +520,7 @@ def create_one_backup(attrs=None):
|
|||||||
"object_count": None,
|
"object_count": None,
|
||||||
"container": 'container-' + uuid.uuid4().hex,
|
"container": 'container-' + uuid.uuid4().hex,
|
||||||
"size": random.randint(1, 20),
|
"size": random.randint(1, 20),
|
||||||
|
"is_incremental": False,
|
||||||
"status": "error",
|
"status": "error",
|
||||||
"availability_zone": 'zone' + uuid.uuid4().hex,
|
"availability_zone": 'zone' + uuid.uuid4().hex,
|
||||||
}
|
}
|
||||||
|
@ -356,6 +356,7 @@ class TestBackupList(TestBackup):
|
|||||||
'Description',
|
'Description',
|
||||||
'Status',
|
'Status',
|
||||||
'Size',
|
'Size',
|
||||||
|
'Incremental',
|
||||||
)
|
)
|
||||||
columns_long = columns + (
|
columns_long = columns + (
|
||||||
'Availability Zone',
|
'Availability Zone',
|
||||||
@ -372,6 +373,7 @@ class TestBackupList(TestBackup):
|
|||||||
b.description,
|
b.description,
|
||||||
b.status,
|
b.status,
|
||||||
b.size,
|
b.size,
|
||||||
|
b.is_incremental,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
data_long = []
|
data_long = []
|
||||||
@ -383,6 +385,7 @@ class TestBackupList(TestBackup):
|
|||||||
b.description,
|
b.description,
|
||||||
b.status,
|
b.status,
|
||||||
b.size,
|
b.size,
|
||||||
|
b.is_incremental,
|
||||||
b.availability_zone,
|
b.availability_zone,
|
||||||
volume_backup.VolumeIdColumn(b.volume_id),
|
volume_backup.VolumeIdColumn(b.volume_id),
|
||||||
b.container,
|
b.container,
|
||||||
|
@ -309,8 +309,22 @@ class ListVolumeBackup(command.Lister):
|
|||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
volume_client = self.app.client_manager.sdk_connection.volume
|
volume_client = self.app.client_manager.sdk_connection.volume
|
||||||
|
|
||||||
columns = ('id', 'name', 'description', 'status', 'size')
|
columns = (
|
||||||
column_headers = ('ID', 'Name', 'Description', 'Status', 'Size')
|
'id',
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'status',
|
||||||
|
'size',
|
||||||
|
'is_incremental',
|
||||||
|
)
|
||||||
|
column_headers = (
|
||||||
|
'ID',
|
||||||
|
'Name',
|
||||||
|
'Description',
|
||||||
|
'Status',
|
||||||
|
'Size',
|
||||||
|
'Incremental',
|
||||||
|
)
|
||||||
if parsed_args.long:
|
if parsed_args.long:
|
||||||
columns += ('availability_zone', 'volume_id', 'container')
|
columns += ('availability_zone', 'volume_id', 'container')
|
||||||
column_headers += ('Availability Zone', 'Volume', 'Container')
|
column_headers += ('Availability Zone', 'Volume', 'Container')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user