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 @@ -396,6 +396,25 @@ async def get_port_mappings(self) -> List[PortMapping]:
396396
397397 return port_mappings
398398
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+
399418 async def reboot (self ):
400419 """Reboot Sagemcom F@st device."""
401420 action = {
You can’t perform that action at this time.
0 commit comments