[pve-devel] applied [PATCH container] depreacate pve-lxc-snapshot-name in favor of identical pve-snapshot-name

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Mar 27 15:26:18 CET 2019


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 debian/control               |  4 ++--
 src/PVE/API2/LXC.pm          |  4 ++--
 src/PVE/API2/LXC/Snapshot.pm | 12 ++++++------
 src/PVE/LXC/Config.pm        |  6 ------
 4 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/debian/control b/debian/control
index 2b115de..66e1726 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: perl
 Priority: extra
 Maintainer: Proxmox Support Team <support at proxmox.com>
 Build-Depends: debhelper (>= 7.0.50~),
-               libpve-common-perl (>= 5.0-48),
+               libpve-common-perl (>= 5.0-49),
                libpve-guest-common-perl (>= 2.0-20),
                libpve-storage-perl,
                libtest-mockmodule-perl,
@@ -18,7 +18,7 @@ Section: perl
 Priority: optional
 Architecture: all
 Depends: file,
-         libpve-common-perl (>= 5.0-48),
+         libpve-common-perl (>= 5.0-49),
          libpve-guest-common-perl (>= 2.0-20),
          libpve-storage-perl (>= 5.0-31),
          lxc-pve,
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index bba22d6..6de121f 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1074,7 +1074,7 @@ __PACKAGE__->register_method({
                 type => 'string',
                 enum => [ 'snapshot', 'clone', 'copy' ],
             },
-            snapname => get_standard_option('pve-lxc-snapshot-name', {
+            snapname => get_standard_option('pve-snapshot-name', {
                 optional => 1,
             }),
 	},
@@ -1233,7 +1233,7 @@ __PACKAGE__->register_method({
 		type => 'string', format => 'pve-poolid',
 		description => "Add the new CT to the specified pool.",
 	    },
-	    snapname => get_standard_option('pve-lxc-snapshot-name', {
+	    snapname => get_standard_option('pve-snapshot-name', {
 		optional => 1,
             }),
 	    storage => get_standard_option('pve-storage-id', {
diff --git a/src/PVE/API2/LXC/Snapshot.pm b/src/PVE/API2/LXC/Snapshot.pm
index db41954..38df2e0 100644
--- a/src/PVE/API2/LXC/Snapshot.pm
+++ b/src/PVE/API2/LXC/Snapshot.pm
@@ -115,7 +115,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid', { completion => \&PVE::LXC::complete_ctid }),
-	    snapname => get_standard_option('pve-lxc-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshot-name'),
 #	    vmstate => {
 #		optional => 1,
 #		type => 'boolean',
@@ -174,7 +174,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid'),
-	    snapname => get_standard_option('pve-lxc-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshot-name'),
 	    force => {
 		optional => 1,
 		type => 'boolean',
@@ -220,7 +220,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    vmid => get_standard_option('pve-vmid'),
 	    node => get_standard_option('pve-node'),
-	    snapname => get_standard_option('pve-lxc-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshot-name'),
 	},
     },
     returns => {
@@ -257,7 +257,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid'),
-	    snapname => get_standard_option('pve-lxc-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshot-name'),
 	},
     },
     returns => {
@@ -305,7 +305,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid'),
-	    snapname => get_standard_option('pve-lxc-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshot-name'),
 	    description => {
 		optional => 1,
 		type => 'string',
@@ -360,7 +360,7 @@ __PACKAGE__->register_method({
 	properties => {
 	    node => get_standard_option('pve-node'),
 	    vmid => get_standard_option('pve-vmid'),
-	    snapname => get_standard_option('pve-lxc-snapshot-name'),
+	    snapname => get_standard_option('pve-snapshot-name'),
 	},
     },
     returns => { type => "object" },
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 866d787..07ae3bf 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -267,12 +267,6 @@ PVE::JSONSchema::register_standard_option('pve-ct-rootfs', {
     optional => 1,
 });
 
-PVE::JSONSchema::register_standard_option('pve-lxc-snapshot-name', {
-    description => "The name of the snapshot.",
-    type => 'string', format => 'pve-configid',
-    maxLength => 40,
-});
-
 my $features_desc = {
     mount => {
 	optional => 1,
-- 
2.20.1





More information about the pve-devel mailing list