mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
Share the list of all disk image formats
(crobinso: Fix some trailing whitespace)
This commit is contained in:
parent
796ddd966a
commit
beab40e3b1
@ -24,7 +24,7 @@ from gi.repository import Gtk
|
|||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
# pylint: enable=E0611
|
# pylint: enable=E0611
|
||||||
|
|
||||||
from virtinst import VirtualFilesystem
|
from virtinst import VirtualFilesystem, StorageVolume
|
||||||
from virtinst import util
|
from virtinst import util
|
||||||
from virtManager import uihelpers
|
from virtManager import uihelpers
|
||||||
from virtManager.baseclass import vmmGObjectUI
|
from virtManager.baseclass import vmmGObjectUI
|
||||||
@ -122,7 +122,7 @@ class vmmFSDetails(vmmGObjectUI):
|
|||||||
simple_store_set("fs-driver-combo", [VirtualFilesystem.DRIVER_LOOP,
|
simple_store_set("fs-driver-combo", [VirtualFilesystem.DRIVER_LOOP,
|
||||||
VirtualFilesystem.DRIVER_NBD,
|
VirtualFilesystem.DRIVER_NBD,
|
||||||
VirtualFilesystem.DRIVER_DEFAULT])
|
VirtualFilesystem.DRIVER_DEFAULT])
|
||||||
simple_store_set("fs-format-combo", VirtualFilesystem.NBD_FORMATS)
|
simple_store_set("fs-format-combo", StorageVolume.ALL_FORMATS),
|
||||||
simple_store_set("fs-wrpolicy-combo", VirtualFilesystem.WRPOLICIES)
|
simple_store_set("fs-wrpolicy-combo", VirtualFilesystem.WRPOLICIES)
|
||||||
self.show_pair_combo("fs-type", self.conn.is_openvz() or self.conn.is_lxc())
|
self.show_pair_combo("fs-type", self.conn.is_openvz() or self.conn.is_lxc())
|
||||||
self.show_check_button("fs-readonly",
|
self.show_check_button("fs-readonly",
|
||||||
|
@ -51,9 +51,6 @@ class VirtualFilesystem(VirtualDevice):
|
|||||||
DRIVER_DEFAULT = "default"
|
DRIVER_DEFAULT = "default"
|
||||||
DRIVERS = [DRIVER_PATH, DRIVER_HANDLE, DRIVER_LOOP, DRIVER_NBD, DRIVER_DEFAULT]
|
DRIVERS = [DRIVER_PATH, DRIVER_HANDLE, DRIVER_LOOP, DRIVER_NBD, DRIVER_DEFAULT]
|
||||||
|
|
||||||
NBD_FORMATS = ["raw", "bochs", "cloop", "cow", "dmg", "iso", "qcow",
|
|
||||||
"qcow2", "qed", "vmdk", "vpc", "fat", "vhd", "vdi"]
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def type_to_source_prop(fs_type):
|
def type_to_source_prop(fs_type):
|
||||||
"""
|
"""
|
||||||
|
@ -460,6 +460,10 @@ class StorageVolume(_StorageObject):
|
|||||||
"""
|
"""
|
||||||
Base class for building and installing libvirt storage volume xml
|
Base class for building and installing libvirt storage volume xml
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
ALL_FORMATS = ["raw", "bochs", "cloop", "cow", "dmg", "iso", "qcow",
|
||||||
|
"qcow2", "qed", "vmdk", "vpc", "fat", "vhd", "vdi"]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def find_free_name(pool_object, basename, **kwargs):
|
def find_free_name(pool_object, basename, **kwargs):
|
||||||
"""
|
"""
|
||||||
@ -608,8 +612,7 @@ class StorageVolume(_StorageObject):
|
|||||||
|
|
||||||
def list_formats(self):
|
def list_formats(self):
|
||||||
if self.file_type == self.TYPE_FILE:
|
if self.file_type == self.TYPE_FILE:
|
||||||
return ["raw", "bochs", "cloop", "cow", "dmg", "iso", "qcow",
|
return ALL_FORMATS
|
||||||
"qcow2", "qed", "vmdk", "vpc", "vdi"]
|
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def list_create_formats(self):
|
def list_create_formats(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user