MAC Vendor OUI use scheduler (#15187)

* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true
Improve scheduler validation handle non-standard install directories and systems without systemd
Add index to table to improve speed and improve mac->vendor lookup speed
Scheduled weekly with random wait to prevent stampeding herd issues for upstream
drop oui update from daily

* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true

* Lint fixes and better prefix detection

* update schema file
This commit is contained in:
Tony Murray
2023-08-03 19:29:30 -05:00
committed by GitHub
parent 5a56e9081e
commit 12f8bb2040
19 changed files with 273 additions and 135 deletions
@@ -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('vendor_ouis', function (Blueprint $table) {
$table->string('oui', 12)->change();
$table->unique(['oui']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('vendor_ouis', function (Blueprint $table) {
$table->dropUnique('vendor_ouis_oui_unique');
$table->string('oui')->change();
});
}
};