feature: add vnish fault light.

This commit is contained in:
upstreamdata
2024-05-26 21:39:41 -06:00
parent 8f41d4d0bc
commit a9fd9343d8
2 changed files with 19 additions and 0 deletions

View File

@@ -147,6 +147,22 @@ class VNish(VNishFirmware, BMMiner):
except KeyError:
pass
async def fault_light_off(self) -> bool:
result = await self.web.find_miner()
if result is not None:
if result.get("on") is False:
return True
else:
await self.web.find_miner()
async def fault_light_on(self) -> bool:
result = await self.web.find_miner()
if result is not None:
if result.get("on") is True:
return True
else:
await self.web.find_miner()
async def _get_hostname(self, web_summary: dict = None) -> str:
if web_summary is None:
web_info = await self.web.info()

View File

@@ -140,3 +140,6 @@ class VNishWebAPI(BaseWebAPI):
async def autotune_presets(self) -> dict:
return await self.send_command("autotune/presets")
async def find_miner(self) -> dict:
return await self.send_command("find-miner", privileged=True)