File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -399,6 +399,25 @@ async def get_port_mappings(self) -> List[PortMapping]:
399399
400400 return port_mappings
401401
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+
402421 async def reboot (self ):
403422 """Reboot Sagemcom F@st device."""
404423 action = {
You can’t perform that action at this time.
0 commit comments