Files
librenms-librenms/app/Models/MplsLspPath.php
Vitali Kari 532ab1127a Mpls Path Visualization (#10936)
* update nokia mibs

* database migrations

* add code

* html code

* update db schema

* add test data

* add FIXME

* move mibs/nokia/MPLS-TE-MIB to mibs/MPLS-TE-MIB
2020-01-01 23:45:06 +01:00

53 lines
1.3 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use LibreNMS\Interfaces\Models\Keyable;
class MplsLspPath extends Model implements Keyable
{
protected $primaryKey = 'lsp_path_id';
public $timestamps = false;
protected $fillable = [
'lsp_id',
'path_oid',
'device_id',
'mplsLspPathRowStatus',
'mplsLspPathLastChange',
'mplsLspPathType',
'mplsLspPathBandwidth',
'mplsLspPathOperBandwidth',
'mplsLspPathAdminState',
'mplsLspPathOperState',
'mplsLspPathState',
'mplsLspPathFailCode',
'mplsLspPathFailNodeAddr',
'mplsLspPathMetric',
'mplsLspPathOperMetric',
'mplsLspPathTimeUp',
'mplsLspPathTimeDown',
'mplsLspPathTransitionCount',
'mplsLspPathTunnelARHopListIndex',
'mplsLspPathTunnelCHopListIndex',
];
// ---- Helper Functions ----
/**
* Get a string that can identify a unique instance of this model
* @return string
*/
public function getCompositeKey()
{
return $this->lsp_id . '-' . $this->path_oid;
}
// ---- Define Relationships ----
public function lsp()
{
return $this->belongsTo('App\Models\MplsLsp', 'lsp_id');
}
}