- Implement v_index() and v_name() consistently across classes in support of Netdisco 0.96

- Don't query dynamic VLANs - table may be too large on some devices
This commit is contained in:
Eric Miller
2007-11-04 03:29:47 +00:00
parent b17f04e762
commit e51c9c1da2
3 changed files with 58 additions and 4 deletions

View File

@@ -302,6 +302,34 @@ sub bp_index {
# VLAN methods. Newer HPs use Q-BRIDGE, older use proprietary MIB. Use
# Q-BRIDGE if available.
sub v_index {
my $hp = shift;
my $partial = shift;
# Newer devices
my $q_index = $hp->SUPER::v_index($partial);
if (defined $q_index and scalar(keys %$q_index)){
return $q_index;
}
# Older devices
return $hp->hp_v_index($partial);
}
sub v_name {
my $hp = shift;
my $partial = shift;
# Newer devices
my $q_name = $hp->SUPER::v_name($partial);
if (defined $q_name and scalar(keys %$q_name)){
return $q_name;
}
# Older devices
return $hp->hp_v_name($partial);
}
sub i_vlan {
my $hp = shift;