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.
1 parent 9441fdd commit 67fe20cCopy full SHA for 67fe20c
sagemcom_api/client.py
@@ -396,6 +396,25 @@ async def get_port_mappings(self) -> List[PortMapping]:
396
397
return port_mappings
398
399
+ async def get_logs(self) -> List[str]:
400
+ """
401
+ Retrieve system logs.
402
403
+
404
+ actions = {
405
+ "id": 0,
406
+ "method": "getVendorLogDownloadURI",
407
+ "xpath": urllib.parse.quote("Device/DeviceInfo/VendorLogFiles/VendorLogFile[@uid='1']"),
408
+ }
409
410
+ response = await self.__api_request_async([actions], False)
411
+ log_path = response["reply"]["actions"][0]["callbacks"][0]["parameters"]["uri"]
412
413
+ log_uri = f"{self.protocol}://{self.host}{log_path}"
414
+ response = await self.session.get(log_uri, timeout=10)
415
416
+ return await response.text()
417
418
async def reboot(self):
419
"""Reboot Sagemcom F@st device."""
420
action = {
0 commit comments