[pve-devel] [PATCH V5 qemu-server] Move option 'pve-snapshot-name' to PVE::JSONSchema.

Wolfgang Link w.link at proxmox.com
Mon Sep 18 11:52:48 CEST 2017


To avoid update problems rename pve-snapshot-name to pve-snapshotname.
---
 PVE/API2/Qemu.pm  | 16 ++++++++--------
 PVE/QemuServer.pm |  8 +-------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 66ffc07..761120c 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2236,7 +2236,7 @@ __PACKAGE__->register_method({
                 type => 'string',
                 enum => [ 'snapshot', 'clone', 'copy' ],
             },
-            snapname => get_standard_option('pve-snapshot-name', {
+            snapname => get_standard_option('pve-snapshotname', {
                 optional => 1,
             }),
 	},
@@ -2323,7 +2323,7 @@ __PACKAGE__->register_method({
 		type => 'string', format => 'pve-poolid',
 		description => "Add the new VM to the specified pool.",
 	    },
-            snapname => get_standard_option('pve-snapshot-name', {
+            snapname => get_standard_option('pve-snapshotname', {
 		optional => 1,
             }),
 	    storage => get_standard_option('pve-storage-id', {
@@ -3201,7 +3201,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid', { completion => \&PVE::QemuServer::complete_vmid }),
-	    snapname => get_standard_option('pve-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshotname'),
 	    vmstate => {
 		optional => 1,
 		type => 'boolean',
@@ -3256,7 +3256,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    vmid => get_standard_option('pve-vmid'),
 	    node => get_standard_option('pve-node'),
-	    snapname => get_standard_option('pve-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshotname'),
 	},
     },
     returns => {
@@ -3293,7 +3293,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid'),
-	    snapname => get_standard_option('pve-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshotname'),
 	    description => {
 		optional => 1,
 		type => 'string',
@@ -3349,7 +3349,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid'),
-	    snapname => get_standard_option('pve-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshotname'),
 	},
     },
     returns => { type => "object" },
@@ -3388,7 +3388,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid', { completion => \&PVE::QemuServer::complete_vmid }),
-	    snapname => get_standard_option('pve-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshotname'),
 	},
     },
     returns => {
@@ -3436,7 +3436,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid', { completion => \&PVE::QemuServer::complete_vmid }),
-	    snapname => get_standard_option('pve-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshotname'),
 	    force => {
 		optional => 1,
 		type => 'boolean',
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 03e7ca4..487317d 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -62,12 +62,6 @@ PVE::JSONSchema::register_standard_option('pve-qm-stateuri', {
     optional => 1,
 });
 
-PVE::JSONSchema::register_standard_option('pve-snapshot-name', {
-    description => "The name of the snapshot.",
-    type => 'string', format => 'pve-configid',
-    maxLength => 40,
-});
-
 PVE::JSONSchema::register_standard_option('pve-qm-image-format', {
     type => 'string',
     enum => [qw(raw cow qcow qed qcow2 vmdk cloop)],
@@ -462,7 +456,7 @@ EODESCR
 	type => 'string',
 	format => $cpu_fmt,
     },
-    parent => get_standard_option('pve-snapshot-name', {
+    parent => get_standard_option('pve-snapshotname', {
 	optional => 1,
 	description => "Parent snapshot name. This is used internally, and should not be modified.",
     }),
-- 
2.11.0





More information about the pve-devel mailing list