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()
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()
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()
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()
def get_instance_path(instance, forceold=False, relative=False): return libvirt_utils.get_instance_path(instance, forceold=forceold, relative=relative)