fix #686 makerancidconf excluded setting should be (ACL) list not dict
This commit is contained in:
1
Changes
1
Changes
@@ -16,6 +16,7 @@
|
||||
* #667 neighbors map with VLAN filter should only consider configured ports
|
||||
* #676 remove vim settings from files
|
||||
* #679 uninitialised error
|
||||
* #686 makerancidconf excluded setting should be (ACL) list not dict
|
||||
|
||||
2.044004 - 2019-10-30
|
||||
|
||||
|
||||
@@ -52,9 +52,14 @@ register_worker({ phase => 'main' }, sub {
|
||||
|
||||
$config->{groups} ||= { default => 'any' };
|
||||
$config->{vendormap} ||= {};
|
||||
$config->{excluded} ||= {};
|
||||
$config->{by_ip} ||= {};
|
||||
$config->{by_hostname} ||= {};
|
||||
$config->{excluded} ||= [];
|
||||
$config->{by_ip} ||= [];
|
||||
$config->{by_hostname} ||= [];
|
||||
|
||||
# fix #686 excluded setting should be (ACL) list not dict
|
||||
if (ref {} eq ref $config->{excluded}) {
|
||||
$config->{excluded} = [ values %{ $config->{excluded} } ];
|
||||
}
|
||||
|
||||
my $routerdb = {};
|
||||
while (my $d = $devices->next) {
|
||||
@@ -147,17 +152,17 @@ C<rancid>. All keys are optional:
|
||||
down_age: '1 day' # default
|
||||
delimiter: ';' # default
|
||||
default_group: 'default' # default
|
||||
excluded:
|
||||
excludegroup1: 'host_group1_acl'
|
||||
excludegroup2: 'host_group2_acl'
|
||||
groups:
|
||||
groupname1: 'host_group3_acl'
|
||||
groupname2: 'host_group4_acl'
|
||||
groupname1: 'host_group1_acl'
|
||||
groupname2: 'host_group2_acl'
|
||||
vendormap:
|
||||
vname1: 'host_group5_acl'
|
||||
vname2: 'host_group6_acl'
|
||||
by_ip: 'host_group7_acl'
|
||||
by_hostname: 'host_group8_acl'
|
||||
vname1: 'host_group3_acl'
|
||||
vname2: 'host_group4_acl'
|
||||
excluded:
|
||||
- 'host_group5_acl'
|
||||
- 'another.host.example.com'
|
||||
by_ip: 'host_group6_acl'
|
||||
by_hostname: 'host_group7_acl'
|
||||
|
||||
Note that the default directory for writing files is not F</var/lib/rancid> so
|
||||
you may wish to set this in C<rancid_cvsroot>, (especially if migrating from the old
|
||||
@@ -216,14 +221,6 @@ be different from the default, the default is C<;>.
|
||||
|
||||
Put devices into this group if they do not match any other groups defined.
|
||||
|
||||
=head2 C<excluded>
|
||||
|
||||
This dictionary defines a list of devices that you do not wish to export to
|
||||
rancid configuration.
|
||||
|
||||
The value should be a L<Netdisco ACL|https://github.com/netdisco/netdisco/wiki/Configuration#access-control-lists>
|
||||
to select devices in the Netdisco database.
|
||||
|
||||
=head2 C<groups>
|
||||
|
||||
This dictionary maps rancid group names with configuration which will match
|
||||
@@ -255,6 +252,12 @@ a good solution to use the correct device type. Example:
|
||||
vendormap:
|
||||
cisco-sb: 'group:grp-ciscosb'
|
||||
|
||||
=head2 C<excluded>
|
||||
|
||||
L<Netdisco
|
||||
ACL|https://github.com/netdisco/netdisco/wiki/Configuration#access-control-lists>
|
||||
to identify devices that will be excluded from the rancid configuration.
|
||||
|
||||
=head2 C<by_ip>
|
||||
|
||||
L<Netdisco
|
||||
|
||||
Reference in New Issue
Block a user