(plugin) apps::vmware::connector - mode discovery add tags option (#3790)

This commit is contained in:
qgarnier 2022-07-28 14:23:43 +02:00 committed by GitHub
parent f59d16d7c1
commit 195cc1a69a
1 changed files with 12 additions and 4 deletions

View File

@ -33,7 +33,8 @@ sub new {
$options{options}->add_options(arguments => { $options{options}->add_options(arguments => {
'resource-type:s' => { name => 'resource_type' }, 'resource-type:s' => { name => 'resource_type' },
'prettify' => { name => 'prettify' } 'prettify' => { name => 'prettify' },
'tags' => { name => 'tags' }
}); });
return $self; return $self;
@ -47,9 +48,12 @@ sub check_options {
sub run { sub run {
my ($self, %options) = @_; my ($self, %options) = @_;
my $response = $options{custom}->execute(params => $self->{option_results}, my $response = $options{custom}->execute(
command => 'discovery', force_response => 1); params => $self->{option_results},
command => 'discovery',
force_response => 1
);
my $encoded_data; my $encoded_data;
eval { eval {
if (defined($self->{option_results}->{prettify})) { if (defined($self->{option_results}->{prettify})) {
@ -85,6 +89,10 @@ to discover (Can be: 'esx', 'vm') (Mandatory).
Prettify JSON output. Prettify JSON output.
=item B<--tags>
Add tags (centreon-vmware connector minimum version 3.2.5 required).
=back =back
=cut =cut