Revert "WIP - Added VRP SFPs thresholds and map entPhysical to ifIndexes (#10355)" (#10362)

This reverts commit a3bb92074e.
This commit is contained in:
Tony Murray
2019-06-21 21:42:21 -05:00
committed by GitHub
parent a3bb92074e
commit 8b0a1d902a
3 changed files with 8 additions and 44 deletions

View File

@@ -63,10 +63,6 @@ modules:
oid: hwEntityOpticalRxPower
op: '<='
value: 0
-
oid: hwEntityAdminStatus
op: '='
value: 12
-
oid: hwOpticalModuleInfoTable
value: hwEntityOpticalTxPower
@@ -82,10 +78,6 @@ modules:
oid: hwEntityOpticalTxPower
op: '<='
value: 0
-
oid: hwEntityAdminStatus
op: '='
value: 12
-
oid: hwOpticalModuleInfoTable
value: hwEntityOpticalLaneRxPower
@@ -96,17 +88,11 @@ modules:
index: 'lane-rx-{{ $index }}'
divisor: 100
group: '{{ $entPhysicalName }}'
high_limit: hwEntityOpticalRxHighThreshold
low_limit: hwEntityOpticalRxLowThreshold
skip_values:
-
oid: hwEntityOpticalRxPower
op: '>'
value: 0
-
oid: hwEntityAdminStatus
op: '='
value: 12
-
oid: hwOpticalModuleInfoTable
value: hwEntityOpticalLaneTxPower
@@ -116,17 +102,11 @@ modules:
entPhysicalIndex_measured: ports
index: 'lane-tx-{{ $index }}'
group: '{{ $entPhysicalName }}'
high_limit: hwEntityOpticalTxHighThreshold
low_limit: hwEntityOpticalTxLowThreshold
skip_values:
-
oid: hwEntityOpticalTxPower
op: '>'
value: 0
-
oid: hwEntityAdminStatus
op: '='
value: 12
divisor: 100
voltage:
data:

View File

@@ -117,7 +117,6 @@ if ($device['os'] == 'saf-cfm') {
}
foreach ($entity_array as $entPhysicalIndex => $entry) {
unset($ifIndex);
if ($device['os'] == 'junos') {
// Juniper's MIB doesn't have the same objects as the Entity MIB, so some values
// are made up here.
@@ -191,19 +190,6 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
$entPhysicalIsFRU = $entry['entPhysicalIsFRU'];
$entPhysicalAlias = $entry['entPhysicalAlias'];
$entPhysicalAssetID = $entry['entPhysicalAssetID'];
//VRP devices seems to use LogicalEntity '1' instead of '0' like the default code checks.
//Standard code is still run after anyway.
if (array_key_exists('1', $entry) && array_key_exists('entAliasMappingIdentifier', $entry['1'])) {
$ifIndex = $entry['1']['entAliasMappingIdentifier'];
if (!strpos($ifIndex, 'fIndex') || $ifIndex == '') {
unset($ifIndex);
} else {
$ifIndex_array = explode('.', $ifIndex);
$ifIndex = $ifIndex_array[1];
unset($ifIndex_array);
}
}
} else {
$entPhysicalDescr = array_key_exists('entPhysicalDescr', $entry) ? $entry['entPhysicalDescr'] : '';
$entPhysicalContainedIn = array_key_exists('entPhysicalContainedIn', $entry) ? $entry['entPhysicalContainedIn'] : '';
@@ -224,13 +210,14 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
if (isset($entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'])) {
$ifIndex = $entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'];
if (!strpos($ifIndex, 'fIndex') || $ifIndex == '') {
unset($ifIndex);
} else {
$ifIndex_array = explode('.', $ifIndex);
$ifIndex = $ifIndex_array[1];
unset($ifIndex_array);
}
}
if (!strpos($ifIndex, 'fIndex') || $ifIndex == '') {
unset($ifIndex);
} else {
$ifIndex_array = explode('.', $ifIndex);
$ifIndex = $ifIndex_array[1];
unset($ifIndex_array);
}
// List of real names for cisco entities

View File

@@ -784,9 +784,6 @@ function discover_entity_physical(&$valid, $device, $entPhysicalIndex, $entPhysi
'entPhysicalAlias' => $entPhysicalAlias,
'entPhysicalAssetID' => $entPhysicalAssetID,
);
if (!empty($ifIndex)) {
$update_data['ifIndex'] = $ifIndex;
}
dbUpdate($update_data, 'entPhysical', '`device_id`=? AND `entPhysicalIndex`=?', array($device['device_id'], $entPhysicalIndex));
}//end if
$valid[$entPhysicalIndex] = 1;