Skip to content

Commit d57a4e1

Browse files
committed
fix(backend): update managed-switch API ...
1 parent fafbd96 commit d57a4e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/probe/managed_switch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func probeManagedSwitch(c http.FortiHTTP, meta *TargetMetadata) ([]prometheus.Me
234234

235235
// Consider implementing pagination to remove this limit of 1000 entries
236236
var response managedResponse
237-
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 {
237+
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 {
238238
log.Printf("Error: %v", err)
239239
return nil, false
240240
}

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)