MPLS updates and bugfixing (#11468)

* MPLS updates and bugfixing

* Tests

* tests

* code climate, tests

* tests

* tests

* remove nokiaIfName(), fetch ifName from the database instead

* restore from messed rebase

* tests

* btw, fix travis about the missing docs

* tests

* tests

* clean the messed up test data an generate new for timos

* rebase
This commit is contained in:
Vitali Kari
2020-05-02 06:05:51 +02:00
committed by GitHub
parent b8248ac1ee
commit 1108f7d530
20 changed files with 19810 additions and 12134 deletions

View File

@@ -330,9 +330,9 @@ sapDown: The SAP associated with the service is down.">Oper State</a></th>
if ($sdpbind['sdpBindAdminStatus'] == 'up') {
$adminstate_status_color = 'success';
}
if ($sdpbind['sdpBindOperStatus'] == 'up') {
if ($sdpbind['sdpBindAdminStatus'] == 'up' && $sdpbind['sdpBindOperStatus'] == 'up') {
$operstate_status_color = 'success';
} else {
} elseif ($sdpbind['sdpBindAdminStatus'] == 'up' && $sdpbind['sdpBindOperStatus'] == 'down') {
$operstate_status_color = 'danger';
}
@@ -398,12 +398,21 @@ vprn services are up when the service is administratively up however routing fun
if ($svc['svcAdminStatus'] == 'up') {
$adminstate_status_color = 'success';
}
if ($svc['svcOperStatus'] == 'up') {
if ($svc['svcAdminStatus'] == 'up' && $svc['svcOperStatus'] == 'up') {
$operstate_status_color = 'success';
} else {
} elseif ($svc['svcAdminStatus'] == 'up' && $svc['svcOperStatus'] == 'down') {
$operstate_status_color = 'danger';
}
$fdb_usage_perc = $svc['svcTlsFdbNumEntries'] / $svc['svcTlsFdbTableSize'] * 100;
if ($fdb_usage_perc > 95) {
$fdb_status_color = 'danger';
} elseif ($fdb_usage_perc > 75) {
$fdb_status_color = 'warning';
} else {
$fdb_status_color = 'success';
}
echo "<tr bgcolor=$bg_colour>
<td>" . generate_device_link($device, 0, array('tab' => 'routing', 'proto' => 'mpls', 'view' => 'services')) . '</td>
<td>' . $svc['svc_oid'] . '</td>
@@ -419,7 +428,7 @@ vprn services are up when the service is administratively up however routing fun
<td>' . $svc['vrf_name'] . '</td>
<td>' . $svc['svcTlsMacLearning'] . '</td>
<td>' . $svc['svcTlsFdbTableSize'] . '</td>
<td>' . $svc['svcTlsFdbNumEntries'] . '</td>
<td><span class="label label-' . $fdb_status_color . '">' . $svc['svcTlsFdbNumEntries'] . '</td>
<td>' . $svc['svcTlsStpAdminStatus'] . '</td>
<td>' . $svc['svcTlsStpOperStatus'] . '</td>';
echo '</tr>';
@@ -461,9 +470,9 @@ if ($vars['view'] == 'saps') {
if ($sap['sapAdminStatus'] == 'up') {
$adminstate_status_color = 'success';
}
if ($sap['sapOperStatus'] == 'up') {
if ($sap['sapAdminStatus'] == 'up' && $sap['sapOperStatus'] == 'up') {
$operstate_status_color = 'success';
} else {
} elseif ($sap['sapAdminStatus'] == 'up' && $sap['sapOperStatus'] == 'down') {
$operstate_status_color = 'danger';
}