Exemplo n.º 1
0
class SimpleCompute(object):
    def __init__(self):
        self.cn = Virtman(openstack_compatible=False)
        self.cn.heartbeat_thread.start()

    def create(self, instance_name, image_name, image_connection, snapshot_dev):
        return self.cn.create(instance_name, image_name, image_connection,
                              snapshot_dev)

    def destroy(self, instance_name):
        return self.cn.destroy(instance_name)

    def list(self):
        return self.cn.list()

    @staticmethod
    def create_image_target(image_name, file_path, loop_dev, iqn_prefix):
        return imageservice.create_image_target(image_name, file_path, loop_dev,
                                                iqn_prefix)

    @staticmethod
    def destroy_image_target(image_name):
        return imageservice.destroy_image_target(image_name)

    @staticmethod
    def list_image_target():
        return imageservice.list_image_target()
Exemplo n.º 2
0
 def __init__(self):
     self.cn = Virtman(openstack_compatible=False)
     self.cn.heartbeat_thread.start()