]> git.proxmox.com Git - pve-manager.git/commitdiff
api: pool update: rename 'transfer' parameter to 'allow-move'
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 8 Sep 2023 11:31:30 +0000 (13:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 8 Sep 2023 11:36:38 +0000 (13:36 +0200)
The 'allow' wording makes it clearer that we just not block something,
but do not really do anything else. And we use the 'move' wording also
for when moving volumes between guests, which is in the same spirit as
this here (remove something from a entity and add it to another).

While this was already bumped, we did not move it outside of pvetest,
so I do not see practical concerns with API breakage.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Pool.pm
www/manager6/grid/PoolMembers.js

index ffcc3946ea1330c23db00449e793ab53fd1135fd..51ac71941d86dd30b1066dfb74ced4e9e7573d10 100644 (file)
@@ -131,7 +131,7 @@ __PACKAGE__->register_method ({
                type => 'string',  format => 'pve-storage-id-list',
                optional => 1,
            },
-           transfer => {
+           'allow-move' => {
                description => 'Allow adding a guest even if already in another pool.'
                    .' The guest will be removed from its current pool and added to this one.',
                type => 'boolean',
@@ -173,8 +173,8 @@ __PACKAGE__->register_method ({
                    } else {
                        die "VM $vmid is already a pool member\n" if $pool_config->{vms}->{$vmid};
                        if (defined(my $existing_pool = $usercfg->{vms}->{$vmid})) {
-                           die "VM $vmid belongs already to pool '$existing_pool' and 'transfer' is not set\n"
-                            if !$param->{transfer};
+                           die "VM $vmid belongs already to pool '$existing_pool' and 'allow-move' is not set\n"
+                            if !$param->{'allow-move'};
 
                            $rpcenv->check($authuser, "/pool/$existing_pool", ['Pool.Allocate']);
                            delete $usercfg->{pools}->{$existing_pool}->{vms}->{$vmid};
index 04e967e41cf428799d981bbbf64bdad691c7dbb4..74950d80ea4ec5b49e539bc904bbb52180a453f6 100644 (file)
@@ -7,7 +7,7 @@ Ext.define('PVE.pool.AddVM', {
     isCreate: true,
 
     extraRequestParams: {
-       transfer: 1,
+       'allow-move': 1,
     },
 
     initComponent: function() {