On Fri, Jul 22, 2016 at 03:41:17PM +0100, Paul Seward wrote:
> On 22 July 2016 at 15:24, Matthew Newton <[email protected]> wrote:
> >
> > We've been using an in-house perl module[0] to manage the APs with
> > SNMP and do this for all new APs without any issue.
>
> That looks significantly less nasty than the scripts I've been debugging
> this week which essentially do a lot of the same things.
Thanks. We've got a whole web interface for managing the APs and
graphing, etc, based around it.
> I'll add it to my to-investigate list.
As an example to fix up any AP groups that are not correct:
----------------------------------------------------------------------
#! /usr/bin/perl -w
use strict;
use CiscoWireless;
my $cw = CiscoWireless->new();
my $comm = "community";
my @wlcs = ( "10.1.0.5", "10.1.0.6", "10.1.0.7" );
foreach my $wlcip (@wlcs) {
my $wlc = new CiscoWireless::WLC($ip, {community => $comm, version => 1});
$cw->add_wlc($wlc);
}
foreach my $ap (@{$cw->get_aps()}) {
next unless $ap->apgroup() eq "default-group";
$ap->apgroup("campus");
print "fixed up " . $ap->name() . "\n";
}
----------------------------------------------------------------------
I should really do a proper Perl makefile and examples, sorry.
Just never got around to it. :(
Moving AP groups without needing a reboot was a surprise, to be
honest. But it's worked for several years and no side effects yet
that we can see. But (as I discovered recently with an 18-month
TAC case, completely unrelated to this), doing things they don't
"support" can break stuff in mysterious ways, so YMMV.
Matthew
--
Matthew Newton, Ph.D. <[email protected]>
Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom
For IT help contact helpdesk extn. 2253, <[email protected]>
**********
Participation and subscription information for this EDUCAUSE Constituent Group
discussion list can be found at http://www.educause.edu/groups/.