Skip to content

Commit 451376c

Browse files
authored
fix(backend): update managed-switch API ... (#324)
Signed-off-by: Marius Antonsen <antonsen.marius@gmail.com>
1 parent cbf6808 commit 451376c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/probe/managed_switch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func probeManagedSwitch(c http.FortiHTTP, _ *TargetMetadata) ([]prometheus.Metri
235235

236236
// Consider implementing pagination to remove this limit of 1000 entries
237237
var response managedResponse
238-
if err := c.Get("api/v2/monitor/switch-controller/managed-switch", "vdom=*&start=0&poe=true&port_stats=true&transceiver=true&count=1000", &response); err != nil {
238+
if err := c.Get("api/v2/monitor/switch-controller/managed-switch/status", "vdom=*&start=0&poe=true&port_stats=true&transceiver=true&count=1000", &response); err != nil {
239239
log.Printf("Error: %v", err)
240240
return nil, false
241241
}

pkg/probe/managed_switch_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
func TestProbeManagedSwitch(t *testing.T) {
2525
c := newFakeClient()
26-
c.prepare("api/v2/monitor/switch-controller/managed-switch", "testdata/managed-switch.jsonnet")
26+
c.prepare("api/v2/monitor/switch-controller/managed-switch/status", "testdata/managed-switch.jsonnet")
2727
r := prometheus.NewPedanticRegistry()
2828
if !testProbe(probeManagedSwitch, c, r) {
2929
t.Errorf("probeManagedSwitchStatus() returned non-success")

0 commit comments

Comments
 (0)