From 8b372bc9fb6efcacea960bd3772b68306ef77301 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 1 Feb 2018 18:06:33 +0000 Subject: [PATCH] skip devices in makerancidconf that have no real vendor --- Changes | 4 ++++ lib/App/Netdisco/Worker/Plugin/MakeRancidConf.pm | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Changes b/Changes index 9f96a78e..88bd3b1b 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,10 @@ * Do not attempt Canonical IP change to non-discoverable IP + [BUG FIXES] + + * MakeRancidConf was incorrectly parsing its own config + 2.038034 - 2018-01-31 [NEW FEATURES] diff --git a/lib/App/Netdisco/Worker/Plugin/MakeRancidConf.pm b/lib/App/Netdisco/Worker/Plugin/MakeRancidConf.pm index 89db1ef5..af1a2805 100644 --- a/lib/App/Netdisco/Worker/Plugin/MakeRancidConf.pm +++ b/lib/App/Netdisco/Worker/Plugin/MakeRancidConf.pm @@ -47,6 +47,11 @@ register_worker({ phase => 'main' }, sub { (pairkeys pairfirst { check_acl_no($d, $b) } %{ $config->{vendormap} }) || $d->vendor; + if ($vendor =~ m/(?:enterprises\.|netdisco)/) { + debug " skipping $d with unresolved vendor: $vendor"; + next; + } + push @{$routerdb->{$group}}, (sprintf "%s${delimiter}%s${delimiter}%s", $name, $vendor, ($d->get_column('old') ? 'down' : 'up'));