fix quantum dxi
This commit is contained in:
parent
51c16b4419
commit
05561b8da9
|
@ -119,7 +119,7 @@ sub new {
|
||||||
sub change_macros {
|
sub change_macros {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
foreach ('warning_status', 'critical_status') {
|
foreach (('warning_status', 'critical_status')) {
|
||||||
if (defined($self->{option_results}->{$_})) {
|
if (defined($self->{option_results}->{$_})) {
|
||||||
$self->{option_results}->{$_} =~ s/%\{(.*?)\}/\$self->{result_values}->{$1}/g;
|
$self->{option_results}->{$_} =~ s/%\{(.*?)\}/\$self->{result_values}->{$1}/g;
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,10 @@ sub check_options {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
$self->SUPER::check_options(%options);
|
$self->SUPER::check_options(%options);
|
||||||
|
|
||||||
|
if (defined($self->{option_results}->{hostname}) && $self->{option_results}->{hostname} ne '') {
|
||||||
|
$self->{option_results}->{remote} = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$instance_mode = $self;
|
$instance_mode = $self;
|
||||||
$self->change_macros();
|
$self->change_macros();
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,6 +129,10 @@ sub check_options {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
$self->SUPER::check_options(%options);
|
$self->SUPER::check_options(%options);
|
||||||
|
|
||||||
|
if (defined($self->{option_results}->{hostname}) && $self->{option_results}->{hostname} ne '') {
|
||||||
|
$self->{option_results}->{remote} = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$instance_mode = $self;
|
$instance_mode = $self;
|
||||||
$self->change_macros();
|
$self->change_macros();
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ sub new {
|
||||||
sub change_macros {
|
sub change_macros {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
foreach ('warning_status', 'critical_status') {
|
foreach (('warning_status', 'critical_status')) {
|
||||||
if (defined($self->{option_results}->{$_})) {
|
if (defined($self->{option_results}->{$_})) {
|
||||||
$self->{option_results}->{$_} =~ s/%\{(.*?)\}/\$self->{result_values}->{$1}/g;
|
$self->{option_results}->{$_} =~ s/%\{(.*?)\}/\$self->{result_values}->{$1}/g;
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,10 @@ sub check_options {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
$self->SUPER::check_options(%options);
|
$self->SUPER::check_options(%options);
|
||||||
|
|
||||||
|
if (defined($self->{option_results}->{hostname}) && $self->{option_results}->{hostname} ne '') {
|
||||||
|
$self->{option_results}->{remote} = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$instance_mode = $self;
|
$instance_mode = $self;
|
||||||
$self->change_macros();
|
$self->change_macros();
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ sub new {
|
||||||
sub change_macros {
|
sub change_macros {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
foreach ('warning_status', 'critical_status') {
|
foreach (('warning_status', 'critical_status')) {
|
||||||
if (defined($self->{option_results}->{$_})) {
|
if (defined($self->{option_results}->{$_})) {
|
||||||
$self->{option_results}->{$_} =~ s/%\{(.*?)\}/\$self->{result_values}->{$1}/g;
|
$self->{option_results}->{$_} =~ s/%\{(.*?)\}/\$self->{result_values}->{$1}/g;
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,10 @@ sub check_options {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
$self->SUPER::check_options(%options);
|
$self->SUPER::check_options(%options);
|
||||||
|
|
||||||
|
if (defined($self->{option_results}->{hostname}) && $self->{option_results}->{hostname} ne '') {
|
||||||
|
$self->{option_results}->{remote} = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$instance_mode = $self;
|
$instance_mode = $self;
|
||||||
$self->change_macros();
|
$self->change_macros();
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ sub new {
|
||||||
sub change_macros {
|
sub change_macros {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
foreach ('warning_status', 'critical_status') {
|
foreach (('warning_status', 'critical_status')) {
|
||||||
if (defined($self->{option_results}->{$_})) {
|
if (defined($self->{option_results}->{$_})) {
|
||||||
$self->{option_results}->{$_} =~ s/%\{(.*?)\}/\$self->{result_values}->{$1}/g;
|
$self->{option_results}->{$_} =~ s/%\{(.*?)\}/\$self->{result_values}->{$1}/g;
|
||||||
}
|
}
|
||||||
|
@ -131,6 +131,10 @@ sub check_options {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
$self->SUPER::check_options(%options);
|
$self->SUPER::check_options(%options);
|
||||||
|
|
||||||
|
if (defined($self->{option_results}->{hostname}) && $self->{option_results}->{hostname} ne '') {
|
||||||
|
$self->{option_results}->{remote} = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$instance_mode = $self;
|
$instance_mode = $self;
|
||||||
$self->change_macros();
|
$self->change_macros();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,8 @@ sub new {
|
||||||
%{$self->{modes}} = (
|
%{$self->{modes}} = (
|
||||||
'compaction' => 'storage::quantum::dxi::ssh::mode::compaction',
|
'compaction' => 'storage::quantum::dxi::ssh::mode::compaction',
|
||||||
'disk-usage' => 'storage::quantum::dxi::ssh::mode::diskusage',
|
'disk-usage' => 'storage::quantum::dxi::ssh::mode::diskusage',
|
||||||
'hostbus-adapter-status' => 'storage::quantum::dxi::ssh::mode::hostbusadapterstatus',
|
|
||||||
'health' => 'storage::quantum::dxi::ssh::mode::health',
|
'health' => 'storage::quantum::dxi::ssh::mode::health',
|
||||||
|
'hostbus-adapter-status' => 'storage::quantum::dxi::ssh::mode::hostbusadapterstatus',
|
||||||
'memory' => 'storage::quantum::dxi::ssh::mode::memory',
|
'memory' => 'storage::quantum::dxi::ssh::mode::memory',
|
||||||
'network' => 'storage::quantum::dxi::ssh::mode::network',
|
'network' => 'storage::quantum::dxi::ssh::mode::network',
|
||||||
'reclamation' => 'storage::quantum::dxi::ssh::mode::reclamation',
|
'reclamation' => 'storage::quantum::dxi::ssh::mode::reclamation',
|
||||||
|
|
Loading…
Reference in New Issue