Support obtaining FDB in Avaya SPBM edge deployments in L2::Baystack
NOTE: This requires a RAPID-CITY MIB with the rcBridgeSpbmMacTable
This commit is contained in:
@@ -2,6 +2,11 @@ SNMP::Info - Friendly OO-style interface to Network devices using SNMP.
|
||||
|
||||
version 3.21 ()
|
||||
|
||||
[NEW FEATURES]
|
||||
|
||||
* Support obtaining FDB in Avaya SPBM edge deployments in L2::Baystack
|
||||
NOTE: This requires a RAPID-CITY MIB with the rcBridgeSpbmMacTable
|
||||
|
||||
[ENHANCEMENTS]
|
||||
|
||||
* No longer ignore interfaces based on name, in base L2/L3/L7 device
|
||||
|
||||
@@ -341,6 +341,52 @@ sub peth_port_ifindex {
|
||||
return \%peth_port_ifindex;
|
||||
}
|
||||
|
||||
# Currently only ERS 4800 v5.8+ support the rcBridgeSpbmMacTable
|
||||
# which holds the FDB for a SPBM edge deployment.
|
||||
#
|
||||
# Q-BRIDGE still holds some entries when the rcBridgeSpbmMacTable is in use
|
||||
# so we merge hash entries.
|
||||
|
||||
sub fw_mac {
|
||||
my $rapidcity = shift;
|
||||
|
||||
my $qb = $rapidcity->SUPER::fw_mac() || {};
|
||||
my $spbm = $rapidcity->rc_spbm_fw_mac() || {};
|
||||
my $fw_mac = { %$qb, %$spbm };
|
||||
|
||||
return $fw_mac;
|
||||
}
|
||||
|
||||
sub fw_port {
|
||||
my $rapidcity = shift;
|
||||
|
||||
my $qb = $rapidcity->SUPER::fw_port() || {};
|
||||
my $spbm = $rapidcity->rc_spbm_fw_port() || {};
|
||||
my $fw_port = { %$qb, %$spbm };
|
||||
|
||||
return $fw_port;
|
||||
}
|
||||
|
||||
sub fw_status {
|
||||
my $rapidcity = shift;
|
||||
|
||||
my $qb = $rapidcity->SUPER::fw_status() || {};
|
||||
my $spbm = $rapidcity->rc_spbm_fw_status() || {};
|
||||
my $fw_status = { %$qb, %$spbm };
|
||||
|
||||
return $fw_status;
|
||||
}
|
||||
|
||||
sub qb_fw_vlan {
|
||||
my $rapidcity = shift;
|
||||
|
||||
my $qb = $rapidcity->SUPER::qb_fw_vlan() || {};
|
||||
my $spbm = $rapidcity->rc_spbm_fw_vlan() || {};
|
||||
my $qb_fw_vlan = { %$qb, %$spbm };
|
||||
|
||||
return $qb_fw_vlan;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
@@ -600,6 +646,32 @@ ns_e_vendor().
|
||||
|
||||
=back
|
||||
|
||||
=head2 Layer 2 Forwarding Database
|
||||
|
||||
These methods try to obtain the layer 2 forwarding database entries via the
|
||||
normal bridge methods as well as SPBM entries via rapid city methods.
|
||||
|
||||
=over
|
||||
|
||||
=item $baystack->fw_mac()
|
||||
|
||||
Returns reference to hash of forwarding table MAC Addresses
|
||||
|
||||
=item $baystack->fw_port()
|
||||
|
||||
Returns reference to hash of forwarding table entries port interface
|
||||
identifier (iid)
|
||||
|
||||
=item $baystack->qb_fw_vlan()
|
||||
|
||||
Returns reference to hash of forwarding table entries VLAN ID
|
||||
|
||||
=item $baystack->fw_status()
|
||||
|
||||
Returns reference to hash of forwarding table entries status
|
||||
|
||||
=back
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::SONMP
|
||||
|
||||
See L<SNMP::Info::SONMP/"TABLE METHODS"> for details.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# SNMP::Info::RapidCity
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Eric Miller
|
||||
# Copyright (c) 2014 Eric Miller
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -153,6 +153,11 @@ $VERSION = '3.20';
|
||||
'rc_mlt_ports' => 'rcMltPortMembers',
|
||||
'rc_mlt_index' => 'rcMltIfIndex',
|
||||
'rc_mlt_dp' => 'rcMltDesignatedPort',
|
||||
|
||||
# From RAPID-CITY::rcBridgeSpbmMacTable
|
||||
'rc_spbm_fw_port' => 'rcBridgeSpbmMacCPort',
|
||||
'rc_spbm_fw_status' => 'rcBridgeSpbmMacStatus',
|
||||
'rc_spbm_fw_vlan' => 'rcBridgeSpbmMacCVlanId',
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
@@ -601,6 +606,40 @@ sub agg_ports {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
# break up the rcBridgeSpbmMacEntry INDEX into ISID and MAC Address.
|
||||
sub _spbm_fdbtable_index {
|
||||
my $idx = shift;
|
||||
my @values = split( /\./, $idx );
|
||||
my $isid = shift(@values);
|
||||
return ( $isid, join( ':', map { sprintf "%02x", $_ } @values ) );
|
||||
}
|
||||
|
||||
sub rc_spbm_fw_mac {
|
||||
my $rapidcity = shift;
|
||||
my $partial = shift;
|
||||
|
||||
my $spbm_fw_ports = $rapidcity->rc_spbm_fw_port($partial);
|
||||
my $spbm_fw_mac = {};
|
||||
foreach my $idx ( keys %$spbm_fw_ports ) {
|
||||
my ( $isid, $mac ) = _spbm_fdbtable_index($idx);
|
||||
$spbm_fw_mac->{$idx} = $mac;
|
||||
}
|
||||
return $spbm_fw_mac;
|
||||
}
|
||||
|
||||
sub rc_spbm_fw_isid {
|
||||
my $rapidcity = shift;
|
||||
my $partial = shift;
|
||||
|
||||
my $spbm_fw_ports = $rapidcity->rc_spbm_fw_port($partial);
|
||||
my $spbm_fw_isid = {};
|
||||
foreach my $idx ( keys %$spbm_fw_ports ) {
|
||||
my ( $isid, $mac ) = _spbm_fdbtable_index($idx);
|
||||
$spbm_fw_isid->{$idx} = $isid;
|
||||
}
|
||||
return $spbm_fw_isid;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
@@ -1090,6 +1129,43 @@ Values are ifIndex of the corresponding master ports.
|
||||
|
||||
=back
|
||||
|
||||
=head2 RAPID-CITY Bridge SPBM MAC Table (C<rcBridgeSpbmMacTable>)
|
||||
|
||||
=over
|
||||
|
||||
=item $bridge->rc_spbm_fw_mac()
|
||||
|
||||
Returns reference to hash of forwarding table MAC Addresses
|
||||
|
||||
(C<rcBridgeSpbmMacAddr>)
|
||||
|
||||
=item $rapidcity->rc_spbm_fw_port()
|
||||
|
||||
Returns reference to hash of forwarding table entries port interface
|
||||
identifier (iid)
|
||||
|
||||
(C<rcBridgeSpbmMacCPort>)
|
||||
|
||||
=item $rapidcity->rc_spbm_fw_status()
|
||||
|
||||
Returns reference to hash of forwarding table entries status
|
||||
|
||||
(C<rcBridgeSpbmMacStatus>)
|
||||
|
||||
=item $rapidcity->rc_spbm_fw_vlan()
|
||||
|
||||
Returns reference to hash of forwarding table entries Customer VLAN ID
|
||||
|
||||
(C<rcBridgeSpbmMacCVlanId>)
|
||||
|
||||
=item $rapidcity->rc_spbm_fw_isid()
|
||||
|
||||
Returns reference to hash of forwarding table entries ISID
|
||||
|
||||
(C<rcBridgeSpbmMacIsid>)
|
||||
|
||||
=back
|
||||
|
||||
=head1 SET METHODS
|
||||
|
||||
These are methods that provide SNMP set functionality for overridden methods
|
||||
|
||||
Reference in New Issue
Block a user