Include Voice VLANs in (tagged) VLAN Membership on Cisco devices

This commit is contained in:
Oliver Gorwits
2015-03-07 17:07:17 +00:00
parent 8dfe9ef1cf
commit c0141bcfee
2 changed files with 12 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ version 3.26 ()
[ENHANCEMENTS] [ENHANCEMENTS]
* Add fan and psu reporting to Layer3::Dell * Add fan and psu reporting to Layer3::Dell
* Include Voice VLANs in (tagged) VLAN Membership on Cisco devices
[BUG FIXES] [BUG FIXES]

View File

@@ -228,6 +228,7 @@ sub i_vlan_membership {
my $i_vlan = $vtp->i_vlan2($partial) || {}; my $i_vlan = $vtp->i_vlan2($partial) || {};
my $trunk_dyn_stat = $vtp->vtp_trunk_dyn_stat($partial) || {}; my $trunk_dyn_stat = $vtp->vtp_trunk_dyn_stat($partial) || {};
my $trunk_dyn = $vtp->vtp_trunk_dyn($partial) || {}; my $trunk_dyn = $vtp->vtp_trunk_dyn($partial) || {};
my $i_voice_vlan = $vtp->i_voice_vlan($partial) || {};
my $i_vlan_membership = {}; my $i_vlan_membership = {};
@@ -241,8 +242,17 @@ sub i_vlan_membership {
} }
} }
# Get trunk ports # Get voice VLANs
foreach my $port ( keys %$i_voice_vlan ) {
my $vlan = $i_voice_vlan->{$port};
next unless defined $vlan;
my $dyn = $trunk_dyn->{$port};
unless ($dyn and (($dyn eq 'on') or ($dyn eq 'onNoNegotiate'))) {
push( @{ $i_vlan_membership->{$port} }, $vlan );
}
}
# Get trunk ports
my %oper_vlans; my %oper_vlans;
foreach my $iid ( keys %$vtp_vlans ) { foreach my $iid ( keys %$vtp_vlans ) {
my $vlan = 0; my $vlan = 0;