support action::namespace for netdisco-do
This commit is contained in:
@@ -109,7 +109,7 @@ my $exitstatus = 0;
|
||||
|
||||
foreach my $host (@hostlist) {
|
||||
my $dev = $host ? get_device($host->addr) : undef;
|
||||
if ($dev and not (blessed $dev and $dev->in_storage) and $action ne 'discover') {
|
||||
if ($dev and not (blessed $dev and $dev->in_storage) and $action !~ m/^discover/) {
|
||||
info sprintf "%s: error - Don't know device: %s", $action, $host->addr;
|
||||
next;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ foreach my $host (@hostlist) {
|
||||
$job->log("error running job: $_");
|
||||
};
|
||||
|
||||
if ($job->log eq 'failed to report from any worker!') {
|
||||
if ($job->log eq 'failed to report from any worker!' and not $job->only_namespace) {
|
||||
pod2usage(
|
||||
-msg => (sprintf 'error: %s is not a valid action', $action),
|
||||
-verbose => 2,
|
||||
|
||||
Reference in New Issue
Block a user