mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
API: Add api call to list OSPF ports (#12955)
Signed-off-by: Misha Komarovskiy <zombah@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f8d9ab4d49
commit
e670097bf6
@@ -16,6 +16,7 @@ use App\Models\Availability;
|
||||
use App\Models\Device;
|
||||
use App\Models\DeviceGroup;
|
||||
use App\Models\DeviceOutage;
|
||||
use App\Models\OspfPort;
|
||||
use App\Models\PortGroup;
|
||||
use App\Models\PortsFdb;
|
||||
use App\Models\Sensor;
|
||||
@@ -649,6 +650,17 @@ function list_ospf(Illuminate\Http\Request $request)
|
||||
return api_success($ospf_neighbours, 'ospf_neighbours');
|
||||
}
|
||||
|
||||
function list_ospf_ports(Illuminate\Http\Request $request)
|
||||
{
|
||||
$ospf_ports = OspfPort::hasAccess(Auth::user())
|
||||
->get();
|
||||
if ($ospf_ports->isEmpty()) {
|
||||
return api_error(404, 'Ospf ports do not exist');
|
||||
}
|
||||
|
||||
return api_success($ospf_ports, 'ospf_ports', null, 200, $ospf_ports->count());
|
||||
}
|
||||
|
||||
function get_graph_by_portgroup(Illuminate\Http\Request $request)
|
||||
{
|
||||
$group = $request->route('group');
|
||||
|
||||
Reference in New Issue
Block a user