Add stp_i_mac() to get per STP instance bridge address
This commit is contained in:
@@ -88,6 +88,7 @@ $VERSION = '3.20';
|
|||||||
# to return a hash reference to ease API compatibility with
|
# to return a hash reference to ease API compatibility with
|
||||||
# MST and PVST implementations indexed by a spanning tree
|
# MST and PVST implementations indexed by a spanning tree
|
||||||
# instance id
|
# instance id
|
||||||
|
'stp_i_mac' => 'dot1dBaseBridgeAddress',
|
||||||
'stp_i_time' => 'dot1dStpTimeSinceTopologyChange',
|
'stp_i_time' => 'dot1dStpTimeSinceTopologyChange',
|
||||||
'stp_i_ntop' => 'dot1dStpTopChanges',
|
'stp_i_ntop' => 'dot1dStpTopChanges',
|
||||||
'stp_i_root' => 'dot1dStpDesignatedRoot',
|
'stp_i_root' => 'dot1dStpDesignatedRoot',
|
||||||
@@ -136,6 +137,7 @@ $VERSION = '3.20';
|
|||||||
'fw_mac' => \&SNMP::Info::munge_mac,
|
'fw_mac' => \&SNMP::Info::munge_mac,
|
||||||
'bs_mac' => \&SNMP::Info::munge_mac,
|
'bs_mac' => \&SNMP::Info::munge_mac,
|
||||||
'stp_root' => \&SNMP::Info::munge_prio_mac,
|
'stp_root' => \&SNMP::Info::munge_prio_mac,
|
||||||
|
'stp_i_mac' => \&SNMP::Info::munge_mac,
|
||||||
'stp_i_root' => \&SNMP::Info::munge_prio_mac,
|
'stp_i_root' => \&SNMP::Info::munge_prio_mac,
|
||||||
'stp_p_root' => \&SNMP::Info::munge_prio_mac,
|
'stp_p_root' => \&SNMP::Info::munge_prio_mac,
|
||||||
'stp_p_bridge' => \&SNMP::Info::munge_prio_mac,
|
'stp_p_bridge' => \&SNMP::Info::munge_prio_mac,
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ $VERSION = '3.20';
|
|||||||
|
|
||||||
'ag_mod2_type' => \&SNMP::Info::munge_e_type,
|
'ag_mod2_type' => \&SNMP::Info::munge_e_type,
|
||||||
'ag_mod_type' => \&SNMP::Info::munge_e_type,
|
'ag_mod_type' => \&SNMP::Info::munge_e_type,
|
||||||
'stp_i_mac' => \&SNMP::Info::munge_prio_mac,
|
'stp_i_mac' => \&SNMP::Info::munge_mac,
|
||||||
'stp_i_root' => \&SNMP::Info::munge_prio_mac,
|
'stp_i_root' => \&SNMP::Info::munge_prio_mac,
|
||||||
'stp_p_root' => \&SNMP::Info::munge_prio_mac,
|
'stp_p_root' => \&SNMP::Info::munge_prio_mac,
|
||||||
'stp_p_bridge' => \&SNMP::Info::munge_prio_mac,
|
'stp_p_bridge' => \&SNMP::Info::munge_prio_mac,
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ $VERSION = '3.20';
|
|||||||
|
|
||||||
# From RAPID-CITY::rcStgTable
|
# From RAPID-CITY::rcStgTable
|
||||||
'stp_i_id' => 'rcStgId',
|
'stp_i_id' => 'rcStgId',
|
||||||
|
'stp_i_mac' => 'rcStgBridgeAddress',
|
||||||
'stp_i_time' => 'rcStgTimeSinceTopologyChange',
|
'stp_i_time' => 'rcStgTimeSinceTopologyChange',
|
||||||
'stp_i_ntop' => 'rcStgTopChanges',
|
'stp_i_ntop' => 'rcStgTopChanges',
|
||||||
'stp_i_root' => 'rcStgDesignatedRoot',
|
'stp_i_root' => 'rcStgDesignatedRoot',
|
||||||
@@ -191,6 +192,7 @@ $VERSION = '3.20';
|
|||||||
'rc_vlan_members' => \&SNMP::Info::munge_port_list,
|
'rc_vlan_members' => \&SNMP::Info::munge_port_list,
|
||||||
'rc_vlan_no_join' => \&SNMP::Info::munge_port_list,
|
'rc_vlan_no_join' => \&SNMP::Info::munge_port_list,
|
||||||
'rc_mlt_ports' => \&SNMP::Info::munge_port_list,
|
'rc_mlt_ports' => \&SNMP::Info::munge_port_list,
|
||||||
|
'stp_i_mac' => \&SNMP::Info::munge_mac,
|
||||||
'stp_i_root' => \&SNMP::Info::munge_prio_mac,
|
'stp_i_root' => \&SNMP::Info::munge_prio_mac,
|
||||||
'stp_p_root' => \&SNMP::Info::munge_prio_mac,
|
'stp_p_root' => \&SNMP::Info::munge_prio_mac,
|
||||||
'stp_p_bridge' => \&SNMP::Info::munge_prio_mac,
|
'stp_p_bridge' => \&SNMP::Info::munge_prio_mac,
|
||||||
@@ -755,11 +757,11 @@ sub i_bpduguard_enabled {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub i_stp_state {
|
sub i_stp_state {
|
||||||
my $bridge = shift;
|
my $rapidcity = shift;
|
||||||
my $partial = shift;
|
my $partial = shift;
|
||||||
|
|
||||||
my $bp_index = $bridge->bp_index($partial);
|
my $bp_index = $rapidcity->bp_index($partial);
|
||||||
my $stp_p_state = $bridge->dot1dStpPortState($partial);
|
my $stp_p_state = $rapidcity->dot1dStpPortState($partial);
|
||||||
|
|
||||||
my %i_stp_state;
|
my %i_stp_state;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user