mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add OSPF cost (TOS) (#11929)
* add OspfTos model to include ospfIfMetricEntry data (ospf interface cost) * remove WIP comment * add new model and db migration * update OspfTos relationship to OspfPort and correct cleanup call * add "Cost" to device\routing\ospf web UI interface * updated db-schema test unit * updated db_schema to resolve conflicts * removed tos metrics from rrd ospf stats due to rrdcached errors * reorder db_schema.yaml to match upstream * readd ospf_tos to db_schema * styleCI changes * Capture OSPF test data * add ospf unit tests for iosxr * ospfAuthType * update db_schema * remove extra migrations * add ospf tests for iosxe * add ospf test to ios * merge ospf_tos into ospf_ports * update db_schema * update ospf module unit tests for ios, iosxe, iosxr * fix ospf_ports ospfIfMetricStatus column type * update db_schema * more efficient dropColumn in down() migration Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddTosToOspfPorts extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('ospf_ports', function (Blueprint $table) {
|
||||
$table->string('ospfIfMetricIpAddress', 32)->nullable()->after('ospfIfAuthType');
|
||||
$table->integer('ospfIfMetricAddressLessIf')->nullable()->after('ospfIfMetricIpAddress');
|
||||
$table->integer('ospfIfMetricTOS')->nullable()->after('ospfIfMetricAddressLessIf');
|
||||
$table->integer('ospfIfMetricValue')->nullable()->after('ospfIfMetricTOS');
|
||||
$table->string('ospfIfMetricStatus', 32)->nullable()->after('ospfIfMetricValue');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('ospf_ports', function (Blueprint $table) {
|
||||
$table->dropColumn(['ospfIfMetricIpAddress', 'ospfIfMetricAddressLessIf', 'ospfIfMetricTOS', 'ospfIfMetricValue', 'ospfIfMetricStatus']);
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user