Пример #1
0
    def __init__(self, instance=None, disk_name=None, path=None):
        super(Ploop, self).__init__("file", "ploop", is_block_dev=False)

        self.path = (path or
                     os.path.join(libvirt_utils.get_instance_path(instance),
                                  disk_name))
        self.resolve_driver_format()
Пример #2
0
    def __init__(self, instance=None, disk_name=None, path=None):
        super(Qcow2, self).__init__("file", "qcow2", is_block_dev=False)

        self.path = (path or os.path.join(
            libvirt_utils.get_instance_path(instance), disk_name))
        self.preallocate = (strutils.to_slug(
            CONF.preallocate_images) == 'space')
        self.disk_info_path = os.path.join(os.path.dirname(self.path),
                                           'disk.info')
        self.resolve_driver_format()
Пример #3
0
    def __init__(self, instance=None, disk_name=None, path=None):
        super(Qcow2, self).__init__("file", "qcow2", is_block_dev=False)

        self.path = (path or
                     os.path.join(libvirt_utils.get_instance_path(instance),
                                  disk_name))
        self.preallocate = (
            strutils.to_slug(CONF.preallocate_images) == 'space')
        self.disk_info_path = os.path.join(os.path.dirname(self.path),
                                           'disk.info')
        self.resolve_driver_format()
Пример #4
0
    def __init__(self, instance=None, disk_name=None, path=None):
        super(Ploop, self).__init__("file", "ploop", is_block_dev=False)

        self.path = (path or os.path.join(
            libvirt_utils.get_instance_path(instance), disk_name))
        self.resolve_driver_format()
Пример #5
0
def get_instance_path(instance, forceold=False, relative=False):
    return libvirt_utils.get_instance_path(instance,
                                           forceold=forceold,
                                           relative=relative)
Пример #6
0
def get_instance_path(instance, forceold=False, relative=False):
    return libvirt_utils.get_instance_path(instance, forceold=forceold,
                                           relative=relative)