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:
		| @@ -520,6 +520,7 @@ def create_one_backup(attrs=None): | ||||
|         "object_count": None, | ||||
|         "container": 'container-' + uuid.uuid4().hex, | ||||
|         "size": random.randint(1, 20), | ||||
|         "is_incremental": False, | ||||
|         "status": "error", | ||||
|         "availability_zone": 'zone' + uuid.uuid4().hex, | ||||
|     } | ||||
|   | ||||
| @@ -356,6 +356,7 @@ class TestBackupList(TestBackup): | ||||
|         'Description', | ||||
|         'Status', | ||||
|         'Size', | ||||
|         'Incremental', | ||||
|     ) | ||||
|     columns_long = columns + ( | ||||
|         'Availability Zone', | ||||
| @@ -372,6 +373,7 @@ class TestBackupList(TestBackup): | ||||
|                 b.description, | ||||
|                 b.status, | ||||
|                 b.size, | ||||
|                 b.is_incremental, | ||||
|             ) | ||||
|         ) | ||||
|     data_long = [] | ||||
| @@ -383,6 +385,7 @@ class TestBackupList(TestBackup): | ||||
|                 b.description, | ||||
|                 b.status, | ||||
|                 b.size, | ||||
|                 b.is_incremental, | ||||
|                 b.availability_zone, | ||||
|                 volume_backup.VolumeIdColumn(b.volume_id), | ||||
|                 b.container, | ||||
|   | ||||
| @@ -309,8 +309,22 @@ class ListVolumeBackup(command.Lister): | ||||
|     def take_action(self, parsed_args): | ||||
|         volume_client = self.app.client_manager.sdk_connection.volume | ||||
|  | ||||
|         columns = ('id', 'name', 'description', 'status', 'size') | ||||
|         column_headers = ('ID', 'Name', 'Description', 'Status', 'Size') | ||||
|         columns = ( | ||||
|             'id', | ||||
|             'name', | ||||
|             'description', | ||||
|             'status', | ||||
|             'size', | ||||
|             'is_incremental', | ||||
|         ) | ||||
|         column_headers = ( | ||||
|             'ID', | ||||
|             'Name', | ||||
|             'Description', | ||||
|             'Status', | ||||
|             'Size', | ||||
|             'Incremental', | ||||
|         ) | ||||
|         if parsed_args.long: | ||||
|             columns += ('availability_zone', 'volume_id', 'container') | ||||
|             column_headers += ('Availability Zone', 'Volume', 'Container') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Christian Rohmann
					Christian Rohmann