merged get_sfp into path

This commit is contained in:
Tomaae 2022-06-28 20:13:07 +02:00
parent 8efaa72492
commit 7782503f78
No known key found for this signature in database
GPG key ID: 8360BBD8A381D1C0
2 changed files with 10 additions and 34 deletions

View file

@ -786,7 +786,11 @@ class MikrotikControllerData:
):
self.data["interface"] = parse_api(
data=self.data["interface"],
source=self.api.get_sfp(vals[".id"]),
source=self.api.path(
"/interface/ethernet",
command="monitor",
args={".id": vals[".id"], "once": True},
),
key_search="name",
vals=[
{"name": "status", "default": "unknown"},
@ -814,7 +818,11 @@ class MikrotikControllerData:
else:
self.data["interface"] = parse_api(
data=self.data["interface"],
source=self.api.get_sfp(vals[".id"]),
source=self.api.path(
"/interface/ethernet",
command="monitor",
args={".id": vals[".id"], "once": True},
),
key_search="name",
vals=[
{"name": "status", "default": "unknown"},