Revert ironware BGP-peers changes from PR #10941 (#11096)

* Revert ironware BGP-peers changes from PR #10941.

* Regenerate test data without BGP4V2-MIB support.

* Initialise $local_ip

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
This commit is contained in:
Martijn Schmidt
2020-02-03 14:32:45 +01:00
committed by GitHub
parent c07678d55f
commit 07f3c91e6c
5 changed files with 362 additions and 942 deletions

View File

@@ -97,9 +97,6 @@ if (Config::get('enable_bgp')) {
} elseif ($device['os_group'] === 'cisco') {
$peers_data = snmp_walk($device, 'cbgpPeer2RemoteAs', '-Oq', 'CISCO-BGP4-MIB');
$peer2 = !empty($peers_data);
} elseif ($device['os_group'] === 'brocade') {
$peers_data = snmp_walk($device, 'bgp4V2PeerRemoteAs', '-Oq', 'BGP4V2-MIB', 'brocade');
$peer2 = !empty($peers_data);
}
if (empty($peers_data)) {
@@ -150,14 +147,6 @@ if (Config::get('enable_bgp')) {
$af_list = build_cbgp_peers($device, $peer, $af_data, $peer2);
}
if ($device['os_group'] === 'brocade') {
// Brocade doesn't return MP-BGP SAFIs in the BGP4V2-MIB data, so it only displays the unicast SAFI
d_echo("Brocade:");
$afi = IP::parse($peer['ip'])->getFamily();
$af_list[$peer['ip']][$afi]['unicast'] = 1;
add_cbgp_peer($device, $peer, $afi, 'unicast');
}
if (!$bgp4_mib && $device['os'] == 'junos') {
$afis['ipv4'] = 'ipv4';
$afis['ipv6'] = 'ipv6';