move cisco ces restapi plugin

This commit is contained in:
garnier-quentin 2020-01-14 08:42:56 +01:00
parent e688fcf711
commit 29e69205d6
20 changed files with 32 additions and 29 deletions

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::custom::api;
package hardware::devices::cisco::ces::restapi::custom::api;
use base qw(centreon::plugins::mode);
@ -193,6 +193,7 @@ sub authenticate {
sub request_api {
my ($self, %options) = @_;
return {};
$self->settings();
if (!defined($self->{session_cookie})) {
$self->authenticate(statefile => $self->{cache});

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::callsrt;
package hardware::devices::cisco::ces::restapi::mode::callsrt;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::callssummary;
package hardware::devices::cisco::ces::restapi::mode::callssummary;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::certificates;
package hardware::devices::cisco::ces::restapi::mode::certificates;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components;
package hardware::devices::cisco::ces::restapi::mode::components;
use base qw(centreon::plugins::templates::hardware);
@ -94,7 +94,7 @@ sub set_system {
$self->{components_exec_load} = 0;
$self->{components_path} = 'network::cisco::cces::restapi::mode::components';
$self->{components_path} = 'hardware::devices::cisco::ces::restapi::mode::components';
$self->{components_module} = [
'ad', 'aic', 'aoc', 'camera', 'st', 'software', 'temperature', 'vic',
'vis', 'voc', 'webex'

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::ad;
package hardware::devices::cisco::ces::restapi::mode::components::ad;
use strict;
use warnings;
@ -26,6 +26,8 @@ use warnings;
sub check_ad {
my ($self, %options) = @_;
return if (!defined($options{entry}));
my $instance = $options{instance};
next if ($self->check_filter(section => 'ad', instance => $instance));
$self->{components}->{ad}->{total}++;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::aic;
package hardware::devices::cisco::ces::restapi::mode::components::aic;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::aoc;
package hardware::devices::cisco::ces::restapi::mode::components::aoc;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::camera;
package hardware::devices::cisco::ces::restapi::mode::components::camera;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::software;
package hardware::devices::cisco::ces::restapi::mode::components::software;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::st;
package hardware::devices::cisco::ces::restapi::mode::components::st;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::temperature;
package hardware::devices::cisco::ces::restapi::mode::components::temperature;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::vic;
package hardware::devices::cisco::ces::restapi::mode::components::vic;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::vis;
package hardware::devices::cisco::ces::restapi::mode::components::vis;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::voc;
package hardware::devices::cisco::ces::restapi::mode::components::voc;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::components::webex;
package hardware::devices::cisco::ces::restapi::mode::components::webex;
use strict;
use warnings;

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::diagnostics;
package hardware::devices::cisco::ces::restapi::mode::diagnostics;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::peripherals;
package hardware::devices::cisco::ces::restapi::mode::peripherals;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::mode::sessions;
package hardware::devices::cisco::ces::restapi::mode::sessions;
use base qw(centreon::plugins::templates::counter);

View File

@ -18,7 +18,7 @@
# limitations under the License.
#
package network::cisco::cces::restapi::plugin;
package hardware::devices::cisco::ces::restapi::plugin;
use strict;
use warnings;
@ -32,16 +32,16 @@ sub new {
$self->{version} = '1.0';
%{$self->{modes}} = (
'components' => 'network::cisco::cces::restapi::mode::components',
'calls-summary' => 'network::cisco::cces::restapi::mode::callssummary',
'calls-rt' => 'network::cisco::cces::restapi::mode::callsrt',
'certificates' => 'network::cisco::cces::restapi::mode::certificates',
'diagnostics' => 'network::cisco::cces::restapi::mode::diagnostics',
'peripherals' => 'network::cisco::cces::restapi::mode::peripherals',
'sessions' => 'network::cisco::cces::restapi::mode::sessions'
'components' => 'hardware::devices::cisco::ces::restapi::mode::components',
'calls-summary' => 'hardware::devices::cisco::ces::restapi::mode::callssummary',
'calls-rt' => 'hardware::devices::cisco::ces::restapi::mode::callsrt',
'certificates' => 'hardware::devices::cisco::ces::restapi::mode::certificates',
'diagnostics' => 'hardware::devices::cisco::ces::restapi::mode::diagnostics',
'peripherals' => 'hardware::devices::cisco::ces::restapi::mode::peripherals',
'sessions' => 'hardware::devices::cisco::ces::restapi::mode::sessions'
);
$self->{custom_modes}{api} = 'network::cisco::cces::restapi::custom::api';
$self->{custom_modes}{api} = 'hardware::devices::cisco::ces::restapi::custom::api';
return $self;
}