[pve-devel] [PATCH V6 container] Move option 'pve-lxc-snapshot-name' to PVE::JSONSchema.
Wolfgang Link
w.link at proxmox.com
Mon Sep 25 15:27:35 CEST 2017
Rename pve-lxc-snapshot-name to pve-snapshot-name to have a unified name schema.
---
src/PVE/API2/LXC.pm | 4 ++--
src/PVE/API2/LXC/Snapshot.pm | 12 ++++++------
src/PVE/LXC/Config.pm | 6 ------
3 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 0397224..034f17f 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -982,7 +982,7 @@ __PACKAGE__->register_method({
type => 'string',
enum => [ 'snapshot' ],
},
- snapname => get_standard_option('pve-lxc-snapshot-name', {
+ snapname => get_standard_option('pve-snapshot-name', {
optional => 1,
}),
},
@@ -1138,7 +1138,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 edccbf4..dd3c990 100644
--- a/src/PVE/API2/LXC/Snapshot.pm
+++ b/src/PVE/API2/LXC/Snapshot.pm
@@ -90,7 +90,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',
@@ -149,7 +149,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',
@@ -195,7 +195,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 => {
@@ -232,7 +232,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 => {
@@ -280,7 +280,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',
@@ -335,7 +335,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 c45ce7e..257de12 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -266,12 +266,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 $confdesc = {
lock => {
optional => 1,
--
2.11.0
More information about the pve-devel
mailing list