]> git.proxmox.com Git - qemu-server.git/commitdiff
register new standard option 'pve-qm-image-format'
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 3 Nov 2016 12:21:53 +0000 (13:21 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 3 Nov 2016 12:21:53 +0000 (13:21 +0100)
PVE/QemuServer.pm

index 7ba91adcbe75bcaab2cdf71568ce4cd24d5ce144..6003b8542cc969b34ebc3e26afa153df4cb1dc03 100644 (file)
@@ -75,6 +75,13 @@ PVE::JSONSchema::register_standard_option('pve-snapshot-name', {
     maxLength => 40,
 });
 
+PVE::JSONSchema::register_standard_option('pve-qm-image-format', {
+    type => 'string',
+    enum => [qw(raw cow qcow qed qcow2 vmdk cloop)],
+    description => "The drive's backing file's data format.",
+    optional => 1,
+});
+
 #no warnings 'redefine';
 
 sub cgroups_write {
@@ -734,13 +741,7 @@ my %drivedesc_base = (
        description => "The drive's cache mode",
        optional => 1,
     },
-    format => {
-       type => 'string',
-       format_description => 'image format',
-       enum => [qw(raw cow qcow qed qcow2 vmdk cloop)],
-       description => "The drive's backing file's data format.",
-       optional => 1,
-    },
+    format => get_standard_option('pve-qm-image-format'),
     size => {
        type => 'string',
        format => 'disk-size',
@@ -925,13 +926,7 @@ my $efidisk_fmt = {
        format_description => 'volume',
        description => "The drive's backing volume.",
     },
-    format => {
-       type => 'string',
-       format_description => 'image format',
-       enum => [qw(raw cow qcow qed qcow2 vmdk cloop)],
-       description => "The drive's backing file's data format.",
-       optional => 1,
-    },
+    format => get_standard_option('pve-qm-image-format'),
     size => {
        type => 'string',
        format => 'disk-size',