Remove redundant initialization of swift client
When using ssh, local or s3 storage, freezer do not need do the initialization of swift client in the process of creating image. Change-Id: I5280d3e97bed7f2c488acc2ed6bd2befe1f21b88 Closes-Bug: #1705603
This commit is contained in:
parent
1427e34c3a
commit
55d6645b07
|
@ -90,9 +90,9 @@ class RestoreOs(object):
|
|||
:type restore_from_timestamp: int
|
||||
:return:
|
||||
"""
|
||||
swift = self.client_manager.get_swift()
|
||||
backup = self._get_backups(path, restore_from_timestamp)
|
||||
if self.storage.type == 'swift':
|
||||
swift = self.client_manager.get_swift()
|
||||
path = "{0}_segments/{1}/{2}".format(self.container, path, backup)
|
||||
stream = swift.get_object(self.container,
|
||||
"{}/{}".format(path, backup),
|
||||
|
|
Loading…
Reference in New Issue