+ Fix #368
This commit is contained in:
parent
a6db7e1e95
commit
e3800f7695
|
@ -80,6 +80,8 @@ sub manage_selection {
|
|||
my $name = $obj->{Name};
|
||||
my $state = $map_state{$obj->{State}};
|
||||
my $class = $map_class{$obj->{ResourceClass}};
|
||||
my $id = defined($obj->{Id}) ? $obj->{Id} : $name;
|
||||
my $owner_node = defined($obj->{OwnerNode}) ? $obj->{OwnerNode} : '-';
|
||||
|
||||
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
|
||||
$name !~ /$self->{option_results}->{filter_name}/) {
|
||||
|
@ -87,8 +89,8 @@ sub manage_selection {
|
|||
next;
|
||||
}
|
||||
|
||||
$self->{resources}->{$obj->{Id}} = { name => $name, state => $state, owner_node => $obj->{OwnerNode},
|
||||
class => $class };
|
||||
$self->{resources}->{$id} = { name => $name, state => $state, owner_node => $owner_node,
|
||||
class => $class };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -154,6 +154,7 @@ sub manage_selection {
|
|||
foreach my $obj (in $resultset) {
|
||||
my $name = $obj->{Name};
|
||||
my $state = $map_state{$obj->{State}};
|
||||
my $id = defined($obj->{ID}) ? $obj->{ID} : $name;
|
||||
|
||||
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
|
||||
$name !~ /$self->{option_results}->{filter_name}/) {
|
||||
|
@ -161,7 +162,7 @@ sub manage_selection {
|
|||
next;
|
||||
}
|
||||
|
||||
$self->{network}->{$obj->{ID}} = { display => $name, state => $state };
|
||||
$self->{network}->{$id} = { display => $name, state => $state };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -196,15 +196,17 @@ sub manage_selection {
|
|||
foreach my $obj (in $resultset) {
|
||||
my $name = $obj->{Name};
|
||||
my $state = $map_state{$obj->{State}};
|
||||
my $id = defined($obj->{Id}) ? $obj->{Id} : $name;
|
||||
my $owner_node = defined($obj->{OwnerNode}) ? $obj->{OwnerNode} : '-';
|
||||
|
||||
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
|
||||
$name !~ /$self->{option_results}->{filter_name}/) {
|
||||
$self->{output}->output_add(long_msg => "Skipping '" . $name . "': no matching filter.", debug => 1);
|
||||
$self->{output}->output_add(long_msg => "skipping '" . $name . "': no matching filter.", debug => 1);
|
||||
next;
|
||||
}
|
||||
|
||||
$self->{rg}->{$obj->{Id}} = { display => $name, state => $state, owner_node => $obj->{OwnerNode},
|
||||
preferred_owners => defined($preferred_nodes->{$name}) ? $preferred_nodes->{$name} : [] };
|
||||
$self->{rg}->{$id} = { display => $name, state => $state, owner_node => $owner_node,
|
||||
preferred_owners => defined($preferred_nodes->{$name}) ? $preferred_nodes->{$name} : [] };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -159,14 +159,16 @@ sub manage_selection {
|
|||
foreach my $obj (in $resultset) {
|
||||
my $name = $obj->{Name};
|
||||
my $state = $map_state{$obj->{State}};
|
||||
my $id = defined($obj->{Id}) ? $obj->{Id} : $name;
|
||||
my $owner_node = defined($obj->{OwnerNode}) ? $obj->{OwnerNode} : '-';
|
||||
|
||||
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
|
||||
$name !~ /$self->{option_results}->{filter_name}/) {
|
||||
$self->{output}->output_add(long_msg => "Skipping '" . $name . "': no matching filter.", debug => 1);
|
||||
$self->{output}->output_add(long_msg => "skipping '" . $name . "': no matching filter.", debug => 1);
|
||||
next;
|
||||
}
|
||||
|
||||
$self->{resource}->{$obj->{Id}} = { display => $name, state => $state, owner_node => $obj->{OwnerNode} };
|
||||
$self->{resource}->{$id} = { display => $name, state => $state, owner_node => $owner_node };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue