From 842f00d558b650a055c967dc952f125836c2495a Mon Sep 17 00:00:00 2001 From: qgarnier Date: Mon, 2 Oct 2023 11:00:22 +0100 Subject: [PATCH] =?UTF-8?q?(plugin)=20network::fortinet::fortigate::restap?= =?UTF-8?q?i=20-=20mode=20system=20fix=20not=20=E2=80=A6=20(#4668)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/network/fortinet/fortigate/restapi/mode/system.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/network/fortinet/fortigate/restapi/mode/system.pm b/src/network/fortinet/fortigate/restapi/mode/system.pm index 5c6b1bea90..4b43674d98 100644 --- a/src/network/fortinet/fortigate/restapi/mode/system.pm +++ b/src/network/fortinet/fortigate/restapi/mode/system.pm @@ -49,9 +49,9 @@ sub set_counters { $self->{maps_counters_type} = [ { name => 'vdoms', type => 3, cb_prefix_output => 'prefix_vdom_output', cb_long_output => 'vdom_long_output', indent_long_output => ' ', message_multiple => 'All vdom systems are ok', group => [ - { name => 'cpu', type => 0, display_short => 0, skipped_code => { -10 => 1 } }, - { name => 'memory', type => 0, display_short => 0, skipped_code => { -10 => 1 } }, - { name => 'session', type => 0, display_short => 0, skipped_code => { -10 => 1 } } + { name => 'cpu', type => 0, skipped_code => { -10 => 1 } }, + { name => 'memory', type => 0, skipped_code => { -10 => 1 } }, + { name => 'session', type => 0, skipped_code => { -10 => 1 } } ] } ]; @@ -110,6 +110,10 @@ sub manage_selection { get_param => ['global=1'] ); + if (ref($resources) ne 'ARRAY') { + $resources = [$resources]; + } + $self->{vdoms} = {}; foreach my $resource (@$resources) { next if (defined($self->{option_results}->{filter_vdom}) && $self->{option_results}->{filter_vdom} ne '' &&