We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f210ad9 + 67fe20c commit 906ea35Copy full SHA for 906ea35
sagemcom_api/client.py
@@ -399,6 +399,25 @@ async def get_port_mappings(self) -> List[PortMapping]:
399
400
return port_mappings
401
402
+ async def get_logs(self) -> List[str]:
403
+ """
404
+ Retrieve system logs.
405
406
+
407
+ actions = {
408
+ "id": 0,
409
+ "method": "getVendorLogDownloadURI",
410
+ "xpath": urllib.parse.quote("Device/DeviceInfo/VendorLogFiles/VendorLogFile[@uid='1']"),
411
+ }
412
413
+ response = await self.__api_request_async([actions], False)
414
+ log_path = response["reply"]["actions"][0]["callbacks"][0]["parameters"]["uri"]
415
416
+ log_uri = f"{self.protocol}://{self.host}{log_path}"
417
+ response = await self.session.get(log_uri, timeout=10)
418
419
+ return await response.text()
420
421
async def reboot(self):
422
"""Reboot Sagemcom F@st device."""
423
action = {
0 commit comments