added attributes to execute method, using it on check-for-updates. hardcoded 10 seconds for duration

This commit is contained in:
Ivan Pavlina 2023-05-31 06:56:50 +00:00
parent 251874bdc2
commit 22844e7ae5
2 changed files with 7 additions and 4 deletions

View file

@ -387,9 +387,9 @@ class MikrotikControllerData:
# ---------------------------
# execute
# ---------------------------
def execute(self, path, command, param, value):
def execute(self, path, command, param, value, attributes=None):
"""Change value using Mikrotik API"""
return self.api.execute(path, command, param, value)
return self.api.execute(path, command, param, value, attributes)
# ---------------------------
# run_script
@ -1544,7 +1544,7 @@ class MikrotikControllerData:
):
return
self.execute("/system/package/update", "check-for-updates", None, None)
self.execute("/system/package/update", "check-for-updates", None, None, {"duration": 10})
self.data["fw-update"] = parse_api(
data=self.data["fw-update"],
source=self.api.query("/system/package/update"),