diff options
author | Cédric Bosdonnat <cbosdonnat@suse.com> | 2014-01-24 11:40:09 +0100 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2014-01-25 11:59:32 -0500 |
commit | beab40e3b1f6b303f3308b47a536df7b6799d23d (patch) | |
tree | 5ed2097a48ef22ba2b6d53316d88ad27576928be | |
parent | 796ddd966a856788218172f464144b3471d55a05 (diff) | |
download | virt-manager-beab40e3b1f6b303f3308b47a536df7b6799d23d.tar.gz |
Share the list of all disk image formats
(crobinso: Fix some trailing whitespace)
-rw-r--r-- | virtManager/fsdetails.py | 4 | ||||
-rw-r--r-- | virtinst/devicefilesystem.py | 3 | ||||
-rw-r--r-- | virtinst/storage.py | 7 |
3 files changed, 7 insertions, 7 deletions
diff --git a/virtManager/fsdetails.py b/virtManager/fsdetails.py index e3895cf0..0d32611e 100644 --- a/virtManager/fsdetails.py +++ b/virtManager/fsdetails.py @@ -24,7 +24,7 @@ from gi.repository import Gtk from gi.repository import GObject # pylint: enable=E0611 -from virtinst import VirtualFilesystem +from virtinst import VirtualFilesystem, StorageVolume from virtinst import util from virtManager import uihelpers from virtManager.baseclass import vmmGObjectUI @@ -122,7 +122,7 @@ class vmmFSDetails(vmmGObjectUI): simple_store_set("fs-driver-combo", [VirtualFilesystem.DRIVER_LOOP, VirtualFilesystem.DRIVER_NBD, 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) self.show_pair_combo("fs-type", self.conn.is_openvz() or self.conn.is_lxc()) self.show_check_button("fs-readonly", diff --git a/virtinst/devicefilesystem.py b/virtinst/devicefilesystem.py index 2b1b0baf..f516fed2 100644 --- a/virtinst/devicefilesystem.py +++ b/virtinst/devicefilesystem.py @@ -51,9 +51,6 @@ class VirtualFilesystem(VirtualDevice): DRIVER_DEFAULT = "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 def type_to_source_prop(fs_type): """ diff --git a/virtinst/storage.py b/virtinst/storage.py index fac816de..8464c431 100644 --- a/virtinst/storage.py +++ b/virtinst/storage.py @@ -460,6 +460,10 @@ class StorageVolume(_StorageObject): """ 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 def find_free_name(pool_object, basename, **kwargs): """ @@ -608,8 +612,7 @@ class StorageVolume(_StorageObject): def list_formats(self): if self.file_type == self.TYPE_FILE: - return ["raw", "bochs", "cloop", "cow", "dmg", "iso", "qcow", - "qcow2", "qed", "vmdk", "vpc", "vdi"] + return ALL_FORMATS return [] def list_create_formats(self): |