wip ibm mq
This commit is contained in:
parent
9b16288877
commit
53da9f000d
|
@ -161,7 +161,7 @@ sub connect {
|
||||||
|
|
||||||
$self->{connected} = 1;
|
$self->{connected} = 1;
|
||||||
|
|
||||||
my @results = $self->execute_command(command => 'InquireQueueManager', attrs => { QAttrs => ['QMgrName'] });
|
my @results = $self->execute_command(command => 'InquireQueueManager');
|
||||||
$self->{qmgr_name} = $results[0]->{QMgrName};
|
$self->{qmgr_name} = $results[0]->{QMgrName};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,16 +169,21 @@ sub execute_command {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
$self->connect();
|
$self->connect();
|
||||||
|
|
||||||
my @results;
|
my @results;
|
||||||
my $method = $self->{mq_command}->can($options{command});
|
if ($options{command} eq 'InquireQueueManager') {
|
||||||
if ($method) {
|
@results = $self->{mq_command}->InquireQueueManager(%{$options{attrs}});
|
||||||
@results = $self->{mq_command}->$method(%{$options{attrs}});
|
} elsif ($options{command} eq 'InquireQueueManagerStatus') {
|
||||||
|
@results = $self->{mq_command}->InquireQueueManagerStatus(%{$options{attrs}});
|
||||||
|
} elsif ($options{command} eq 'InquireChannelStatus') {
|
||||||
|
@results = $self->{mq_command}->InquireChannelStatus(%{$options{attrs}});
|
||||||
|
} elsif ($options{command} eq 'InquireQueueStatus') {
|
||||||
|
@results = $self->{mq_command}->InquireQueueStatus(%{$options{attrs}});
|
||||||
|
}
|
||||||
|
|
||||||
if (!@results) {
|
if (!@results) {
|
||||||
$self->{output}->add_option_msg(short_msg => "method '$options{command}' issue: " . $self->{mq_command}->ReasonText());
|
$self->{output}->add_option_msg(short_msg => "method '$options{command}' issue: " . $self->{mq_command}->ReasonText());
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return @results;
|
return @results;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ sub manage_selection {
|
||||||
|
|
||||||
my $result = $options{custom}->execute_command(
|
my $result = $options{custom}->execute_command(
|
||||||
command => 'InquireChannelStatus',
|
command => 'InquireChannelStatus',
|
||||||
attrs => { QAttrs => 'All' }
|
attrs => { }
|
||||||
);
|
);
|
||||||
use Data::Dumper; print Data::Dumper::Dumper($result);
|
use Data::Dumper; print Data::Dumper::Dumper($result);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -82,7 +82,7 @@ sub manage_selection {
|
||||||
|
|
||||||
my $result = $options{custom}->execute_command(
|
my $result = $options{custom}->execute_command(
|
||||||
command => 'InquireQueueManagerStatus',
|
command => 'InquireQueueManagerStatus',
|
||||||
attrs => { QAttrs => 'All' }
|
attrs => { }
|
||||||
);
|
);
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
print Data::Dumper::Dumper($result);
|
print Data::Dumper::Dumper($result);
|
||||||
|
|
|
@ -101,7 +101,7 @@ sub manage_selection {
|
||||||
|
|
||||||
my $result = $options{custom}->execute_command(
|
my $result = $options{custom}->execute_command(
|
||||||
command => 'InquireQueueStatus',
|
command => 'InquireQueueStatus',
|
||||||
attrs => { QAttrs => 'All' }
|
attrs => { QStatusAttrs => ['QName', 'CurrentQDepth', 'OpenInputCount', 'OldestMsgAge'] }
|
||||||
);
|
);
|
||||||
use Data::Dumper; print Data::Dumper::Dumper($result);
|
use Data::Dumper; print Data::Dumper::Dumper($result);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in New Issue