mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Oxidized update and Device remove (#13730)
* Oxidized + Device remove Was just working on oxidized, but then to properly update nodes after delete, updated delete_device() * revert dumb style changes * baseline update and no DI there... * Fix OS first load and device deletion missing tables
This commit is contained in:
@@ -612,9 +612,9 @@ class Device extends BaseModel
|
||||
return $this->hasMany(\App\Models\Alert::class, 'device_id');
|
||||
}
|
||||
|
||||
public function attribs(): HasMany
|
||||
public function alertLogs(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\DeviceAttrib::class, 'device_id');
|
||||
return $this->hasMany(\App\Models\AlertLog::class, 'device_id');
|
||||
}
|
||||
|
||||
public function alertSchedules(): MorphToMany
|
||||
@@ -627,6 +627,16 @@ class Device extends BaseModel
|
||||
return $this->hasMany(\App\Models\Application::class, 'device_id');
|
||||
}
|
||||
|
||||
public function attribs(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\DeviceAttrib::class, 'device_id');
|
||||
}
|
||||
|
||||
public function availability(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\Availability::class, 'device_id');
|
||||
}
|
||||
|
||||
public function bgppeers(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\BgpPeer::class, 'device_id');
|
||||
@@ -647,6 +657,11 @@ class Device extends BaseModel
|
||||
return $this->hasMany(\App\Models\Component::class, 'device_id');
|
||||
}
|
||||
|
||||
public function diskIo(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\DiskIo::class, 'device_id');
|
||||
}
|
||||
|
||||
public function hostResources(): HasMany
|
||||
{
|
||||
return $this->hasMany(HrDevice::class, 'device_id');
|
||||
@@ -662,6 +677,11 @@ class Device extends BaseModel
|
||||
return $this->hasMany(EntPhysical::class, 'device_id');
|
||||
}
|
||||
|
||||
public function entityState(): HasMany
|
||||
{
|
||||
return $this->hasMany(EntityState::class, 'device_id');
|
||||
}
|
||||
|
||||
public function eventlogs(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\Eventlog::class, 'device_id', 'device_id');
|
||||
@@ -692,11 +712,21 @@ class Device extends BaseModel
|
||||
return $this->hasManyThrough(\App\Models\Ipv6Address::class, \App\Models\Port::class, 'device_id', 'port_id', 'device_id', 'port_id');
|
||||
}
|
||||
|
||||
public function isisAdjacencies(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\IsisAdjacency::class, 'device_id', 'device_id');
|
||||
}
|
||||
|
||||
public function location(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(\App\Models\Location::class, 'location_id', 'id');
|
||||
}
|
||||
|
||||
public function macs(): HasMany
|
||||
{
|
||||
return $this->hasMany(Ipv4Mac::class, 'device_id');
|
||||
}
|
||||
|
||||
public function mefInfo(): HasMany
|
||||
{
|
||||
return $this->hasMany(MefInfo::class, 'device_id');
|
||||
@@ -707,6 +737,11 @@ class Device extends BaseModel
|
||||
return $this->hasMany(\App\Models\MuninPlugin::class, 'device_id');
|
||||
}
|
||||
|
||||
public function netscalerVservers(): HasMany
|
||||
{
|
||||
return $this->hasMany(NetscalerVserver::class, 'device_id');
|
||||
}
|
||||
|
||||
public function ospfAreas(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\OspfArea::class, 'device_id');
|
||||
@@ -727,16 +762,6 @@ class Device extends BaseModel
|
||||
return $this->hasMany(\App\Models\OspfPort::class, 'device_id');
|
||||
}
|
||||
|
||||
public function isisAdjacencies(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\IsisAdjacency::class, 'device_id', 'device_id');
|
||||
}
|
||||
|
||||
public function netscalerVservers(): HasMany
|
||||
{
|
||||
return $this->hasMany(NetscalerVserver::class, 'device_id');
|
||||
}
|
||||
|
||||
public function packages(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\Package::class, 'device_id', 'device_id');
|
||||
@@ -767,6 +792,21 @@ class Device extends BaseModel
|
||||
return $this->hasMany(\App\Models\PortsNac::class, 'device_id', 'device_id');
|
||||
}
|
||||
|
||||
public function portsStp(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\PortStp::class, 'device_id', 'device_id');
|
||||
}
|
||||
|
||||
public function portsVlan(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\PortVlan::class, 'device_id', 'device_id');
|
||||
}
|
||||
|
||||
public function processes(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\Process::class, 'device_id');
|
||||
}
|
||||
|
||||
public function processors(): HasMany
|
||||
{
|
||||
return $this->hasMany(\App\Models\Processor::class, 'device_id');
|
||||
@@ -882,6 +922,11 @@ class Device extends BaseModel
|
||||
return $this->hasMany(\App\Models\Syslog::class, 'device_id', 'device_id');
|
||||
}
|
||||
|
||||
public function tnmsNeInfo(): HasMany
|
||||
{
|
||||
return $this->hasMany(TnmsneInfo::class, 'device_id');
|
||||
}
|
||||
|
||||
public function users(): BelongsToMany
|
||||
{
|
||||
// FIXME does not include global read
|
||||
|
Reference in New Issue
Block a user