mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Fix discovery protocols again (#15434)
* Fix discovery protocols again earlier fix had a typo fixes #15432 * Apply fixes from StyleCI --------- Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
parent
6e3261f801
commit
a8b69c1393
@ -12,6 +12,8 @@
|
||||
* See COPYING for more details.
|
||||
*/
|
||||
|
||||
use App\Actions\Device\ValidateDeviceAndCreate;
|
||||
use App\Models\Device;
|
||||
use App\Models\Eventlog;
|
||||
use App\Models\Ipv6Address;
|
||||
use App\Models\Ipv6Network;
|
||||
@ -87,11 +89,11 @@ function discover_new_device($hostname, $device, $method, $interface = null)
|
||||
}
|
||||
|
||||
try {
|
||||
$remote_device = new \App\Models\Device([
|
||||
$remote_device = new Device([
|
||||
'hostname' => $hostname,
|
||||
'poller_group' => $device['poller_group'],
|
||||
]);
|
||||
$result = \App\Actions\Device\ValidateDeviceAndCreate($remote_device)->execute();
|
||||
$result = (new ValidateDeviceAndCreate($remote_device))->execute();
|
||||
|
||||
if ($result) {
|
||||
echo '+[' . $remote_device->hostname . '(' . $remote_device->device_id . ')]';
|
||||
|
Loading…
Reference in New Issue
Block a user