Commit 95958bf8 by adamtorok

Openstack image manager added

parent 6ffceea7
import openstack
import Image
import ImageManager
class OpenstackImageManager(ImageManager.ImageManager):
def __init__(self, cloud) -> None:
self.openstack = openstack.connect(cloud=cloud)
def os_image_to_rc_image(os_image):
return Image.Image(,,
def upload_file(self, path):
os_image = self.openstack.image.create_image(name=path, filename=path, disk_format='iso')
return self.os_image_to_rc_image(os_image)
def get(self, id):
os_image = self.openstack.image.get_image(id)
return self.os_image_to_rc_image(os_image)
def delete(self, id):
def list(self):
images = []
for os_image in self.openstack.image.images():
return images
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