Files
librenms-librenms/app/Models/Route.php
PipoCanaja bf181b9dc2 Added support for routing table collection in discovery (#10182)
* Clean broken VRF lite code
* Change DB table for route discovery
* Add VRF simple support
* add port_id to db and discovery
* static-fy the translation arrays
* sort and search cleaning
* Sorting refactor and validation
* formatItem shortened
* Handle ifIndex==0 meaning no next hop defined (MPLS)
* Sync all create/updates
* purge in daily
* remove old route table
* get rid of inetCidrRouteNextHop_device_id
* fix wonky column orders
* add route snmprec
* fix sorting by interface
* Move to new config
* rename to route the new table
* Properly display ipv6 compressed addresses
* Translation before merge ./lnms translation:generate
* Update manifest
2019-11-17 16:30:43 +01:00

52 lines
964 B
PHP

<?php
namespace App\Models;
class Route extends DeviceRelatedModel
{
protected $table = 'route';
protected $primaryKey = 'route_id';
public static $translateProto = [
'undefined',
'other',
'local',
'netmgmt',
'icmp',
'egp',
'ggp',
'hello',
'rip',
'isIs',
'esIs',
'ciscoIgrp',
'bbnSpfIgp',
'ospf',
'bgp',
'idpr',
'ciscoEigrp',
'dvmrp'
];
public static $translateType = [
'undefined',
'other',
'reject',
'local',
'remote',
'blackhole',
];
public $timestamps = true;
// ---- Define Relationships ----
public function device()
{
return $this->belongsTo('App\Models\Device', 'device_id', 'device_id');
}
public function port()
{
return $this->belongsTo('App\Models\Port', 'port_id', 'port_id');
}
}