From f9cfa38ee7df859c4620f0e286a51308346a14ca Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 8 Sep 2023 13:31:30 +0200 Subject: [PATCH] api: pool update: rename 'transfer' parameter to 'allow-move' 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 --- PVE/API2/Pool.pm | 6 +++--- www/manager6/grid/PoolMembers.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Pool.pm b/PVE/API2/Pool.pm index ffcc3946..51ac7194 100644 --- a/PVE/API2/Pool.pm +++ b/PVE/API2/Pool.pm @@ -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}; diff --git a/www/manager6/grid/PoolMembers.js b/www/manager6/grid/PoolMembers.js index 04e967e4..74950d80 100644 --- a/www/manager6/grid/PoolMembers.js +++ b/www/manager6/grid/PoolMembers.js @@ -7,7 +7,7 @@ Ext.define('PVE.pool.AddVM', { isCreate: true, extraRequestParams: { - transfer: 1, + 'allow-move': 1, }, initComponent: function() { -- 2.39.5