add no-sanity-options
This commit is contained in:
parent
32dd6bfe15
commit
0e021fcf0f
|
@ -33,13 +33,14 @@ sub new {
|
|||
|
||||
$self->{options}->add_options(
|
||||
arguments => {
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'custommode:s' => { name => 'custommode_name' },
|
||||
'list-custommode' => { name => 'list_custommode' },
|
||||
'multiple' => { name => 'multiple' },
|
||||
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'custommode:s' => { name => 'custommode_name' },
|
||||
'list-custommode' => { name => 'list_custommode' },
|
||||
'multiple' => { name => 'multiple' },
|
||||
'no-sanity-options' => { name => 'no_sanity_options' },
|
||||
'pass-manager:s' => { name => 'pass_manager' },
|
||||
}
|
||||
);
|
||||
$self->{version} = '1.0';
|
||||
|
@ -68,8 +69,10 @@ sub load_custom_mode {
|
|||
my ($self, %options) = @_;
|
||||
|
||||
$self->is_custommode(custommode => $self->{custommode_name});
|
||||
centreon::plugins::misc::mymodule_load(output => $self->{output}, module => $self->{custom_modes}{$self->{custommode_name}},
|
||||
error_msg => "Cannot load module --custommode.");
|
||||
centreon::plugins::misc::mymodule_load(
|
||||
output => $self->{output}, module => $self->{custom_modes}{$self->{custommode_name}},
|
||||
error_msg => 'Cannot load module --custommode.'
|
||||
);
|
||||
$self->{custommode_current} = $self->{custom_modes}{$self->{custommode_name}}->new(options => $self->{options}, output => $self->{output}, mode => $self->{custommode_name});
|
||||
}
|
||||
|
||||
|
@ -91,7 +94,7 @@ sub init {
|
|||
if (defined($self->{list_custommode})) {
|
||||
$self->list_custommode();
|
||||
}
|
||||
$self->{options}->set_sanity();
|
||||
$self->{options}->set_sanity() if (!defined($self->{no_sanity_options}));
|
||||
|
||||
# Output HELP
|
||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||
|
@ -293,6 +296,10 @@ List available custom modes.
|
|||
|
||||
Multiple custom mode objects (some mode needs it).
|
||||
|
||||
=item B<--pass-manager>
|
||||
|
||||
Use a password manager.
|
||||
|
||||
=back
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -31,12 +31,13 @@ sub new {
|
|||
$self->{output} = $options{output};
|
||||
|
||||
$self->{options}->add_options(
|
||||
arguments => {
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'mode-version:s' => { name => 'mode_version' },
|
||||
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||
arguments => {
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'mode-version:s' => { name => 'mode_version' },
|
||||
'no-sanity-options' => { name => 'no_sanity_options' },
|
||||
'pass-manager:s' => { name => 'pass_manager' },
|
||||
}
|
||||
);
|
||||
$self->{version} = '1.0';
|
||||
|
@ -72,7 +73,7 @@ sub init {
|
|||
if (defined($self->{list_mode})) {
|
||||
$self->list_mode();
|
||||
}
|
||||
$self->{options}->set_sanity();
|
||||
$self->{options}->set_sanity() if (!defined($self->{no_sanity_options}));
|
||||
|
||||
# Output HELP
|
||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||
|
@ -219,6 +220,10 @@ Check minimal version of mode. If not, unknown error.
|
|||
|
||||
Display plugin version.
|
||||
|
||||
=item B<--pass-manager>
|
||||
|
||||
Use a password manager.
|
||||
|
||||
=back
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -34,12 +34,12 @@ sub new {
|
|||
|
||||
$self->{options}->add_options(
|
||||
arguments => {
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'mode-version:s' => { name => 'mode_version' },
|
||||
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||
'pass-manager:s' => { name => 'pass_manager' },
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'mode-version:s' => { name => 'mode_version' },
|
||||
'no-sanity-options' => { name => 'no_sanity_options' },
|
||||
'pass-manager:s' => { name => 'pass_manager' },
|
||||
}
|
||||
);
|
||||
$self->{version} = '1.0';
|
||||
|
@ -75,7 +75,7 @@ sub init {
|
|||
if (defined($self->{list_mode})) {
|
||||
$self->list_mode();
|
||||
}
|
||||
$self->{options}->set_sanity();
|
||||
$self->{options}->set_sanity() if (!defined($self->{no_sanity_options}));
|
||||
|
||||
# Output HELP
|
||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||
|
|
|
@ -32,15 +32,16 @@ sub new {
|
|||
$self->{output} = $options{output};
|
||||
|
||||
$self->{options}->add_options(
|
||||
arguments => {
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'mode-version:s' => { name => 'mode_version' },
|
||||
'sqlmode:s' => { name => 'sqlmode_name', default => 'dbi' },
|
||||
'list-sqlmode' => { name => 'list_sqlmode' },
|
||||
'multiple' => { name => 'multiple' },
|
||||
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||
arguments => {
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'mode-version:s' => { name => 'mode_version' },
|
||||
'sqlmode:s' => { name => 'sqlmode_name', default => 'dbi' },
|
||||
'list-sqlmode' => { name => 'list_sqlmode' },
|
||||
'multiple' => { name => 'multiple' },
|
||||
'no-sanity-options' => { name => 'no_sanity_options' },
|
||||
'pass-manager:s' => { name => 'pass_manager' },
|
||||
}
|
||||
);
|
||||
$self->{version} = '1.0';
|
||||
|
@ -83,7 +84,7 @@ sub init {
|
|||
if (defined($self->{list_sqlmode})) {
|
||||
$self->list_sqlmode();
|
||||
}
|
||||
$self->{options}->set_sanity();
|
||||
$self->{options}->set_sanity() if (!defined($self->{no_sanity_options}));
|
||||
|
||||
# Output HELP
|
||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||
|
@ -292,6 +293,10 @@ List available sql modes.
|
|||
|
||||
Multiple database connections (some mode needs it).
|
||||
|
||||
=item B<--pass-manager>
|
||||
|
||||
Use a password manager.
|
||||
|
||||
=back
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
|
@ -33,12 +33,13 @@ sub new {
|
|||
$self->{output} = $options{output};
|
||||
|
||||
$self->{options}->add_options(
|
||||
arguments => {
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'mode-version:s' => { name => 'mode_version' },
|
||||
'sanity-options' => { name => 'sanity_options' }, # keep it for 6 month before remove it
|
||||
arguments => {
|
||||
'mode:s' => { name => 'mode_name' },
|
||||
'dyn-mode:s' => { name => 'dynmode_name' },
|
||||
'list-mode' => { name => 'list_mode' },
|
||||
'mode-version:s' => { name => 'mode_version' },
|
||||
'no-sanity-options' => { name => 'no_sanity_options' },
|
||||
'pass-manager:s' => { name => 'pass_manager' },
|
||||
}
|
||||
);
|
||||
$self->{version} = '1.0';
|
||||
|
@ -74,7 +75,7 @@ sub init {
|
|||
if (defined($self->{list_mode})) {
|
||||
$self->list_mode();
|
||||
}
|
||||
$self->{options}->set_sanity();
|
||||
$self->{options}->set_sanity() if (!defined($self->{no_sanity_options}));
|
||||
|
||||
# Output HELP
|
||||
$self->{options}->add_help(package => 'centreon::plugins::output', sections => 'OUTPUT OPTIONS');
|
||||
|
@ -223,6 +224,10 @@ Check minimal version of mode. If not, unknown error.
|
|||
|
||||
Display plugin version.
|
||||
|
||||
=item B<--pass-manager>
|
||||
|
||||
Use a password manager.
|
||||
|
||||
=back
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
|
Loading…
Reference in New Issue