OSPF tables fix integer types (#15528)

All Counter32 and Gauge32 types should be unsigned integers to match the range that can be returned via snmp
This commit is contained in:
Tony Murray
2023-10-31 10:11:56 -05:00
committed by GitHub
parent 7a6ef2491e
commit 9c2d2cd412
5 changed files with 134 additions and 10 deletions

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('ospf_areas', function (Blueprint $table) {
$table->unsignedInteger('ospfSpfRuns')->change();
$table->unsignedInteger('ospfAreaBdrRtrCount')->change();
$table->unsignedInteger('ospfAsBdrRtrCount')->change();
$table->unsignedInteger('ospfAreaLsaCount')->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ospf_areas', function (Blueprint $table) {
$table->integer('ospfSpfRuns')->change();
$table->integer('ospfAreaBdrRtrCount')->change();
$table->integer('ospfAsBdrRtrCount')->change();
$table->integer('ospfAreaLsaCount')->change();
});
}
};

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('ospf_instances', function (Blueprint $table) {
$table->unsignedInteger('ospfExternLsaCount')->change();
$table->unsignedInteger('ospfOriginateNewLsas')->change();
$table->unsignedInteger('ospfRxNewLsas')->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ospf_instances', function (Blueprint $table) {
$table->integer('ospfExternLsaCount')->change();
$table->integer('ospfOriginateNewLsas')->change();
$table->integer('ospfRxNewLsas')->change();
});
}
};

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('ospf_nbrs', function (Blueprint $table) {
$table->unsignedInteger('ospfNbrEvents')->change();
$table->unsignedInteger('ospfNbrLsRetransQLen')->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ospf_nbrs', function (Blueprint $table) {
$table->integer('ospfNbrEvents')->change();
$table->integer('ospfNbrLsRetransQLen')->change();
});
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('ospf_ports', function (Blueprint $table) {
$table->unsignedInteger('ospfIfEvents')->nullable()->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ospf_ports', function (Blueprint $table) {
$table->integer('ospfIfEvents')->nullable()->change();
});
}
};

View File

@@ -1251,10 +1251,10 @@ ospf_areas:
- { Field: ospfAreaId, Type: varchar(32), 'Null': false, Extra: '' } - { Field: ospfAreaId, Type: varchar(32), 'Null': false, Extra: '' }
- { Field: ospfAuthType, Type: varchar(64), 'Null': true, Extra: '' } - { Field: ospfAuthType, Type: varchar(64), 'Null': true, Extra: '' }
- { Field: ospfImportAsExtern, Type: varchar(128), 'Null': false, Extra: '' } - { Field: ospfImportAsExtern, Type: varchar(128), 'Null': false, Extra: '' }
- { Field: ospfSpfRuns, Type: int, 'Null': false, Extra: '' } - { Field: ospfSpfRuns, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: ospfAreaBdrRtrCount, Type: int, 'Null': false, Extra: '' } - { Field: ospfAreaBdrRtrCount, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: ospfAsBdrRtrCount, Type: int, 'Null': false, Extra: '' } - { Field: ospfAsBdrRtrCount, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: ospfAreaLsaCount, Type: int, 'Null': false, Extra: '' } - { Field: ospfAreaLsaCount, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: ospfAreaLsaCksumSum, Type: int, 'Null': false, Extra: '' } - { Field: ospfAreaLsaCksumSum, Type: int, 'Null': false, Extra: '' }
- { Field: ospfAreaSummary, Type: varchar(64), 'Null': false, Extra: '' } - { Field: ospfAreaSummary, Type: varchar(64), 'Null': false, Extra: '' }
- { Field: ospfAreaStatus, Type: varchar(64), 'Null': false, Extra: '' } - { Field: ospfAreaStatus, Type: varchar(64), 'Null': false, Extra: '' }
@@ -1272,11 +1272,11 @@ ospf_instances:
- { Field: ospfVersionNumber, Type: varchar(32), 'Null': false, Extra: '' } - { Field: ospfVersionNumber, Type: varchar(32), 'Null': false, Extra: '' }
- { Field: ospfAreaBdrRtrStatus, Type: varchar(32), 'Null': false, Extra: '' } - { Field: ospfAreaBdrRtrStatus, Type: varchar(32), 'Null': false, Extra: '' }
- { Field: ospfASBdrRtrStatus, Type: varchar(32), 'Null': false, Extra: '' } - { Field: ospfASBdrRtrStatus, Type: varchar(32), 'Null': false, Extra: '' }
- { Field: ospfExternLsaCount, Type: int, 'Null': false, Extra: '' } - { Field: ospfExternLsaCount, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: ospfExternLsaCksumSum, Type: int, 'Null': false, Extra: '' } - { Field: ospfExternLsaCksumSum, Type: int, 'Null': false, Extra: '' }
- { Field: ospfTOSSupport, Type: varchar(32), 'Null': false, Extra: '' } - { Field: ospfTOSSupport, Type: varchar(32), 'Null': false, Extra: '' }
- { Field: ospfOriginateNewLsas, Type: int, 'Null': false, Extra: '' } - { Field: ospfOriginateNewLsas, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: ospfRxNewLsas, Type: int, 'Null': false, Extra: '' } - { Field: ospfRxNewLsas, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: ospfExtLsdbLimit, Type: int, 'Null': true, Extra: '' } - { Field: ospfExtLsdbLimit, Type: int, 'Null': true, Extra: '' }
- { Field: ospfMulticastExtensions, Type: int, 'Null': true, Extra: '' } - { Field: ospfMulticastExtensions, Type: int, 'Null': true, Extra: '' }
- { Field: ospfExitOverflowInterval, Type: int, 'Null': true, Extra: '' } - { Field: ospfExitOverflowInterval, Type: int, 'Null': true, Extra: '' }
@@ -1297,8 +1297,8 @@ ospf_nbrs:
- { Field: ospfNbrOptions, Type: int, 'Null': false, Extra: '' } - { Field: ospfNbrOptions, Type: int, 'Null': false, Extra: '' }
- { Field: ospfNbrPriority, Type: int, 'Null': false, Extra: '' } - { Field: ospfNbrPriority, Type: int, 'Null': false, Extra: '' }
- { Field: ospfNbrState, Type: varchar(32), 'Null': false, Extra: '' } - { Field: ospfNbrState, Type: varchar(32), 'Null': false, Extra: '' }
- { Field: ospfNbrEvents, Type: int, 'Null': false, Extra: '' } - { Field: ospfNbrEvents, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: ospfNbrLsRetransQLen, Type: int, 'Null': false, Extra: '' } - { Field: ospfNbrLsRetransQLen, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: ospfNbmaNbrStatus, Type: varchar(32), 'Null': false, Extra: '' } - { Field: ospfNbmaNbrStatus, Type: varchar(32), 'Null': false, Extra: '' }
- { Field: ospfNbmaNbrPermanence, Type: varchar(32), 'Null': false, Extra: '' } - { Field: ospfNbmaNbrPermanence, Type: varchar(32), 'Null': false, Extra: '' }
- { Field: ospfNbrHelloSuppressed, Type: varchar(32), 'Null': false, Extra: '' } - { Field: ospfNbrHelloSuppressed, Type: varchar(32), 'Null': false, Extra: '' }
@@ -1326,7 +1326,7 @@ ospf_ports:
- { Field: ospfIfState, Type: varchar(32), 'Null': true, Extra: '' } - { Field: ospfIfState, Type: varchar(32), 'Null': true, Extra: '' }
- { Field: ospfIfDesignatedRouter, Type: varchar(32), 'Null': true, Extra: '' } - { Field: ospfIfDesignatedRouter, Type: varchar(32), 'Null': true, Extra: '' }
- { Field: ospfIfBackupDesignatedRouter, Type: varchar(32), 'Null': true, Extra: '' } - { Field: ospfIfBackupDesignatedRouter, Type: varchar(32), 'Null': true, Extra: '' }
- { Field: ospfIfEvents, Type: int, 'Null': true, Extra: '' } - { Field: ospfIfEvents, Type: 'int unsigned', 'Null': true, Extra: '' }
- { Field: ospfIfAuthKey, Type: varchar(128), 'Null': true, Extra: '' } - { Field: ospfIfAuthKey, Type: varchar(128), 'Null': true, Extra: '' }
- { Field: ospfIfStatus, Type: varchar(32), 'Null': true, Extra: '' } - { Field: ospfIfStatus, Type: varchar(32), 'Null': true, Extra: '' }
- { Field: ospfIfMulticastForwarding, Type: varchar(32), 'Null': true, Extra: '' } - { Field: ospfIfMulticastForwarding, Type: varchar(32), 'Null': true, Extra: '' }