mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 12:44:56 +00:00
api: /cluster/resources: add tags to returned properties
by querying 'lock' and 'tags' with 'get_guest_config_properties' Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
4523e5c6db
commit
d18b69822e
@ -376,7 +376,8 @@ __PACKAGE__->register_method({
|
||||
|
||||
# we try to generate 'numbers' by using "$X + 0"
|
||||
if (!$param->{type} || $param->{type} eq 'vm') {
|
||||
my $locked_vms = PVE::Cluster::get_guest_config_property('lock');
|
||||
my $prop_list = [qw(lock tags)];
|
||||
my $props = PVE::Cluster::get_guest_config_properties($prop_list);
|
||||
|
||||
for my $vmid (sort keys %$idlist) {
|
||||
|
||||
@ -408,8 +409,10 @@ __PACKAGE__->register_method({
|
||||
# only skip now to next to ensure that the pool stats above are filled, if eligible
|
||||
next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Audit' ], 1);
|
||||
|
||||
if (defined(my $lock = $locked_vms->{$vmid}->{lock})) {
|
||||
$entry->{lock} = $lock;
|
||||
for my $prop (@$prop_list) {
|
||||
if (defined(my $value = $props->{$vmid}->{$prop})) {
|
||||
$entry->{$prop} = $value;
|
||||
}
|
||||
}
|
||||
|
||||
if (defined($entry->{pool}) &&
|
||||
|
Loading…
Reference in New Issue
Block a user