Commit abe7a473 by Bodor Máté

Fix image file upload and download

parent 5d471157
Pipeline #784 failed with stage
in 39 seconds
......@@ -34,8 +34,8 @@ class OpenstackImageManager(ImageManager, OpenStackConnection):
return self.os_image_to_rc_image(os_image)
def download(self, id):
return self.openstack.image.download_image(id)
def download(self, id, path):
return self.openstack.image.download_image(image=id, output=path)
def delete(self, id) -> bool:
try:
......
class ImageManager:
def __init__(self) -> None:
super().__init__()
def upload_file(self, name, path, format):
raise NotImplementedError
......@@ -11,11 +8,6 @@ class ImageManager:
def download(self, id):
raise NotImplementedError
def download_to_file(self, id, path):
f = open(path, 'wb')
f.write(self.download(id))
f.close()
def delete(self, id):
raise NotImplementedError
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment