PacketFence - BTS - PacketFence
View Issue Details
0001250PacketFenceaddonspublic2011-08-23 11:212012-02-28 14:31
maikel 
obilodeau 
normaltweakalways
closedfixed 
devel 
3.2.03.2.0 
a73a634c916156132177094c3213815e07e8ea09
0001250: pfcmd_vlan getSwitch location
Small patch below

Allowing pfcmd_vlan to show the SNMP location string

Think its handy to get it in more mainstream pf. Probably needs to be moved in pfcmd since ifIndex is not really needed

/usr/local/pf/bin/pfcmd_vlan -getSwitchLocation -ifIndex 6 -switch 192.168.10.10

Amsterdam; Nice Road; Building; Room

With this, the Ip shown for the switch, can now also be parsed into a more human readable form

20a21
> -getSwitchLocation show SNMP location of specified switch
126a128
> my $getSwitchLocation;
149a152
> "getSwitchLocation" => \$getSwitchLocation,
454a458
> || $getSwitchLocation
570a575,578
> } elsif ($getSwitchLocation) {
> $logger->debug("start handling 'getSwitchLocation' command");
> print $switch->getSwitchLocation($ifIndex) . "\n";
> $logger->debug("finished handling 'getSwitchLocation' command");




No tags attached.
diff pfcmd_vlan.diff (1,940) 2012-01-11 10:13
https://www.packetfence.org/bugs/file_download.php?file_id=127&type=bug
Issue History
2011-08-23 11:21maikelNew Issue
2012-01-10 10:02maikelNote Added: 0002524
2012-01-11 08:08obilodeauStatusnew => assigned
2012-01-11 08:08obilodeauAssigned To => obilodeau
2012-01-11 08:09obilodeauNote Added: 0002530
2012-01-11 10:13maikelFile Added: pfcmd_vlan.diff
2012-01-11 10:13maikelNote Added: 0002535
2012-01-28 17:32obilodeauNote Added: 0002556
2012-01-28 17:53obilodeaumtn revision => a73a634c916156132177094c3213815e07e8ea09
2012-01-28 17:53obilodeauNote Added: 0002557
2012-01-28 17:53obilodeauStatusassigned => resolved
2012-01-28 17:53obilodeauFixed in Version => trunk
2012-01-28 17:53obilodeauResolutionopen => fixed
2012-02-28 14:22obilodeauTarget Version => 3.2.0
2012-02-28 14:22obilodeauFixed in Versiontrunk => 3.2.0
2012-02-28 14:31obilodeauNote Added: 0002593
2012-02-28 14:31obilodeauStatusresolved => closed

Notes
(0002524)
maikel   
2012-01-10 10:02   
Is this still something packetfence is interested in? Its quite handy for me to have this pfcmd_vlan command because there is no custom.pm support for it. If not ;) no worries, patching is also fine
(0002530)
obilodeau   
2012-01-11 08:09   
I'll look at it in this cycle. Thanks for bumping up.

Can you provide the patch in unified diff format (diff -u) and attach it instead of putting it in a comment section please?
(0002535)
maikel   
2012-01-11 10:13   
I have added the diff
(0002556)
obilodeau   
2012-01-28 17:32   
First, I just committed error handling and got rid of the ifIndex parameter from the pf::SNMP::getSwitchLocation.

it's in rev: 4a7da4c1d746427a50ef6e6874c88a527856dbb0
(0002557)
obilodeau   
2012-01-28 17:53   
patch applied (with modification to remove $ifIndex's requirement) in rev: a73a634c916156132177094c3213815e07e8ea09

thanks for your contribution!
(0002593)
obilodeau   
2012-02-28 14:31   
Fixed in recently released 3.2.0.