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:
Mohammed Naser 2017-04-16 15:34:23 -04:00
parent b5ef5893d5
commit 65821bc808
No known key found for this signature in database
GPG Key ID: 481CBC90384AEC42
1 changed files with 3 additions and 3 deletions

View File

@ -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'),