fix(ibm/tsamp): correct regexp (#3301)

This commit is contained in:
qgarnier 2021-12-07 10:57:21 +01:00 committed by GitHub
parent 654e5de65d
commit 37890b6074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ sub manage_selection {
);
my $rg = [];
while ($stdout =~ /^(.*)\s+IBM.ResourceGroup:(.*?)\s+.*?Nominal=(.*)\s*$/mig) {
while ($stdout =~ /^(\S.*)\s+IBM.ResourceGroup:(.*?)\s+.*?Nominal=(.*)\s*$/mig) {
my ($name, $opState, $nominalState) = ($2, lc($1), lc($3));
push @$rg, { name => $name, state => $opState, nominal => $nominalState };

View File

@ -120,7 +120,7 @@ sub manage_selection {
};
$self->{rg} = {};
while ($stdout =~ /^(.*)\s+IBM.ResourceGroup:(.*?)\s+.*?Nominal=(.*)\s*$/mig) {
while ($stdout =~ /^(\S.*)\s+IBM.ResourceGroup:(.*?)\s+.*?Nominal=(.*)\s*$/mig) {
my ($name, $opState, $nominalState) = ($2, lc($1), lc($3));
if (defined($self->{option_results}->{filter_rg_name}) && $self->{option_results}->{filter_rg_name} ne '' &&
$name !~ /$self->{option_results}->{filter_rg_name}/) {