From c7f220e86fb7b83a8c1bc8bb7f6544ec8e6316a2 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 21 Dec 2021 11:01:29 +0100 Subject: [PATCH] wip --- connectors/vmware/src/centreon/vmware/cmdlicenses.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/connectors/vmware/src/centreon/vmware/cmdlicenses.pm b/connectors/vmware/src/centreon/vmware/cmdlicenses.pm index acab59985..5d0c7db14 100644 --- a/connectors/vmware/src/centreon/vmware/cmdlicenses.pm +++ b/connectors/vmware/src/centreon/vmware/cmdlicenses.pm @@ -48,8 +48,16 @@ sub run { my $data = {}; if (defined($entries->licenses)) { foreach my $license (@{$entries->licenses}) { - use Data::Dumper; - print Data::Dumper::Dumper($license); + $data->{ $license->{name} } = { + total => $license->{total}, + used => $license->{used}, + edition => $license->{editionKey} + }; + foreach my $prop (@{$license->{properties}}) { + if ($prop->{key} eq 'expirationMinutes') { + $data->{ $license->{name} }->{expiration_minutes} = $prop->{value}; + } + } } }