Skip to content

Commit

Permalink
a fix up for pseudo devices which need layer 3
Browse files Browse the repository at this point in the history
  • Loading branch information
ollyg committed Sep 1, 2019
1 parent 016d249 commit 46236d6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/App/Netdisco/JobQueue/PostgreSQL.pm
Expand Up @@ -79,6 +79,19 @@ sub jq_warm_thrusters {
actionset => $actionset{$_},
}, { key => 'primary' }) for keys %actionset;
});

# fix up the pseudo devices which need layer 3
# TODO remove this after next release
schema('netdisco')->txn_do(sub {
my @hosts = grep { defined }
map { schema('netdisco')->resultset('Device')->search_for_device($_->{only}) }
grep { exists $_->{only} and ref '' eq ref $_->{only} }
grep { exists $_->{driver} and $_->{driver} eq 'cli' }
@{ setting('device_auth') };

$_->update({ layers => \[q{overlay(layers placing '1' from 6 for 1)}] })
for @hosts;
});
}

sub jq_getsome {
Expand Down

0 comments on commit 46236d6

Please sign in to comment.