From 9b3f2f136f6ecc9f341e304f824d73260c1fdde9 Mon Sep 17 00:00:00 2001 From: "jeremy.zhang" Date: Fri, 18 May 2018 11:13:42 +0800 Subject: [PATCH] Fix wrong usage of fields.BackupStatus.AVAILABLE This patch is to fix the wrong usage of fields.BackupStatus.AVAILABLE in cinder\backup\manager.py, changed to use fields.SnapshotStatus.AVAILABLE. Change-Id: I4a8d795a4c46c3159cdd8508e0c5e5c921365ceb --- cinder/backup/manager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cinder/backup/manager.py b/cinder/backup/manager.py index 24d3f0120b5..7f83cc77376 100644 --- a/cinder/backup/manager.py +++ b/cinder/backup/manager.py @@ -423,8 +423,9 @@ class BackupManager(manager.ThreadPoolManager): # Restore the original status. if snapshot_id: - self.db.snapshot_update(context, snapshot_id, - {'status': fields.BackupStatus.AVAILABLE}) + self.db.snapshot_update( + context, snapshot_id, + {'status': fields.SnapshotStatus.AVAILABLE}) else: self.db.volume_update(context, volume_id, {'status': previous_status,