move cisco ces restapi plugin
This commit is contained in:
parent
e688fcf711
commit
29e69205d6
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# 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);
|
use base qw(centreon::plugins::mode);
|
||||||
|
|
||||||
|
@ -193,6 +193,7 @@ sub authenticate {
|
||||||
sub request_api {
|
sub request_api {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
return {};
|
||||||
$self->settings();
|
$self->settings();
|
||||||
if (!defined($self->{session_cookie})) {
|
if (!defined($self->{session_cookie})) {
|
||||||
$self->authenticate(statefile => $self->{cache});
|
$self->authenticate(statefile => $self->{cache});
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# 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);
|
use base qw(centreon::plugins::templates::counter);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# 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);
|
use base qw(centreon::plugins::templates::counter);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# 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);
|
use base qw(centreon::plugins::templates::counter);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# 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);
|
use base qw(centreon::plugins::templates::hardware);
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ sub set_system {
|
||||||
|
|
||||||
$self->{components_exec_load} = 0;
|
$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} = [
|
$self->{components_module} = [
|
||||||
'ad', 'aic', 'aoc', 'camera', 'st', 'software', 'temperature', 'vic',
|
'ad', 'aic', 'aoc', 'camera', 'st', 'software', 'temperature', 'vic',
|
||||||
'vis', 'voc', 'webex'
|
'vis', 'voc', 'webex'
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::ad;
|
package hardware::devices::cisco::ces::restapi::mode::components::ad;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
@ -26,6 +26,8 @@ use warnings;
|
||||||
sub check_ad {
|
sub check_ad {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
return if (!defined($options{entry}));
|
||||||
|
|
||||||
my $instance = $options{instance};
|
my $instance = $options{instance};
|
||||||
next if ($self->check_filter(section => 'ad', instance => $instance));
|
next if ($self->check_filter(section => 'ad', instance => $instance));
|
||||||
$self->{components}->{ad}->{total}++;
|
$self->{components}->{ad}->{total}++;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::aic;
|
package hardware::devices::cisco::ces::restapi::mode::components::aic;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::aoc;
|
package hardware::devices::cisco::ces::restapi::mode::components::aoc;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::camera;
|
package hardware::devices::cisco::ces::restapi::mode::components::camera;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::software;
|
package hardware::devices::cisco::ces::restapi::mode::components::software;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::st;
|
package hardware::devices::cisco::ces::restapi::mode::components::st;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::temperature;
|
package hardware::devices::cisco::ces::restapi::mode::components::temperature;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::vic;
|
package hardware::devices::cisco::ces::restapi::mode::components::vic;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::vis;
|
package hardware::devices::cisco::ces::restapi::mode::components::vis;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::voc;
|
package hardware::devices::cisco::ces::restapi::mode::components::voc;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::mode::components::webex;
|
package hardware::devices::cisco::ces::restapi::mode::components::webex;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# 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);
|
use base qw(centreon::plugins::templates::counter);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# 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);
|
use base qw(centreon::plugins::templates::counter);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# 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);
|
use base qw(centreon::plugins::templates::counter);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
package network::cisco::cces::restapi::plugin;
|
package hardware::devices::cisco::ces::restapi::plugin;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
@ -32,16 +32,16 @@ sub new {
|
||||||
|
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
%{$self->{modes}} = (
|
%{$self->{modes}} = (
|
||||||
'components' => 'network::cisco::cces::restapi::mode::components',
|
'components' => 'hardware::devices::cisco::ces::restapi::mode::components',
|
||||||
'calls-summary' => 'network::cisco::cces::restapi::mode::callssummary',
|
'calls-summary' => 'hardware::devices::cisco::ces::restapi::mode::callssummary',
|
||||||
'calls-rt' => 'network::cisco::cces::restapi::mode::callsrt',
|
'calls-rt' => 'hardware::devices::cisco::ces::restapi::mode::callsrt',
|
||||||
'certificates' => 'network::cisco::cces::restapi::mode::certificates',
|
'certificates' => 'hardware::devices::cisco::ces::restapi::mode::certificates',
|
||||||
'diagnostics' => 'network::cisco::cces::restapi::mode::diagnostics',
|
'diagnostics' => 'hardware::devices::cisco::ces::restapi::mode::diagnostics',
|
||||||
'peripherals' => 'network::cisco::cces::restapi::mode::peripherals',
|
'peripherals' => 'hardware::devices::cisco::ces::restapi::mode::peripherals',
|
||||||
'sessions' => 'network::cisco::cces::restapi::mode::sessions'
|
'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;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue