Switch BackupObject to use backup_id
The backup_uuid parameter was dropped from the API for sometime which means that some of the API calls that expect it to be there in the dashboard do not get it and return 'None' instead. This breaks a few things like the backup list and other features. This patch addresses this issue by replacing the backup_uuid with the new key, backup_id. Change-Id: I4a1ed6cb1247a281f5f1a980fe96fc4a63b18162 Closes-Bug: #1683174
This commit is contained in:
parent
b5ef5893d5
commit
65821bc808
@ -478,7 +478,7 @@ class Backup(object):
|
||||
return backups
|
||||
|
||||
return [utils.BackupObject(
|
||||
backup_id=b.get('backup_uuid'),
|
||||
backup_id=b.get('backup_id'),
|
||||
action=b.get('backup_metadata', {}).get('action'),
|
||||
time_stamp=b.get('backup_metadata', {}).get('time_stamp'),
|
||||
backup_name=b.get('backup_metadata', {}).get('backup_name'),
|
||||
@ -503,7 +503,7 @@ class Backup(object):
|
||||
|
||||
def get(self, backup_id, json=False):
|
||||
|
||||
search = {"match": [{"backup_uuid": backup_id}, ], }
|
||||
search = {"match": [{"backup_id": backup_id}, ], }
|
||||
|
||||
b = self.client.backups.list(limit=1, search=search)
|
||||
b = b[0]
|
||||
@ -512,7 +512,7 @@ class Backup(object):
|
||||
return b
|
||||
|
||||
return utils.BackupObject(
|
||||
backup_id=b.get('backup_uuid'),
|
||||
backup_id=b.get('backup_id'),
|
||||
action=b.get('backup_metadata', {}).get('action'),
|
||||
time_stamp=b.get('backup_metadata', {}).get('time_stamp'),
|
||||
backup_name=b.get('backup_metadata', {}).get('backup_name'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user