enh(mode): Rubrik RestAPI manage disco empty entries (#4720)
This commit is contained in:
parent
9d7be65c92
commit
6f5505e103
|
@ -49,7 +49,9 @@ sub manage_selection {
|
||||||
);
|
);
|
||||||
my $results = {};
|
my $results = {};
|
||||||
foreach (@$jobs) {
|
foreach (@$jobs) {
|
||||||
$results->{ $_->{objectId} } = $_;
|
if (defined($_->{objectId})) {
|
||||||
|
$results->{ $_->{objectId} } = $_;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
@ -63,9 +65,9 @@ sub run {
|
||||||
long_msg => sprintf(
|
long_msg => sprintf(
|
||||||
'[jobId: %s][jobName: %s][jobType: %s][locationName: %s]',
|
'[jobId: %s][jobName: %s][jobType: %s][locationName: %s]',
|
||||||
$_->{objectId},
|
$_->{objectId},
|
||||||
$_->{objectName},
|
defined($_->{objectName}) ? $_->{objectName} : 'none',
|
||||||
$_->{jobType},
|
defined($_->{jobType}) ? $_->{jobType} : 'none',
|
||||||
$_->{locationName}
|
defined($_->{locationName}) ? $_->{locationName} : 'none'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -91,9 +93,9 @@ sub disco_show {
|
||||||
foreach (values %$results) {
|
foreach (values %$results) {
|
||||||
$self->{output}->add_disco_entry(
|
$self->{output}->add_disco_entry(
|
||||||
jobId => $_->{objectId},
|
jobId => $_->{objectId},
|
||||||
jobName => $_->{objectName},
|
jobName => defined($_->{objectName}) ? $_->{objectName} : 'none',
|
||||||
jobType => $_->{jobType},
|
jobType => defined($_->{jobType}) ? $_->{jobType} : 'none',
|
||||||
locationName => $_->{locationName}
|
locationName => defined($_->{locationName}) ? $_->{locationName} : 'none'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue