Don't parse of sispmctl output (doesn't work)
This commit is contained in:
@@ -49,20 +49,21 @@ class SispmctlHost:
|
|||||||
async with self._session.get(url, timeout=3) as resp:
|
async with self._session.get(url, timeout=3) as resp:
|
||||||
if resp.status == 200:
|
if resp.status == 200:
|
||||||
result = await resp.json()
|
result = await resp.json()
|
||||||
await self.notify_switches(result)
|
#await self.notify_switches(result)
|
||||||
else:
|
else:
|
||||||
await self.set_switches_unreachable()
|
await self.set_switches_unreachable()
|
||||||
except ClientConnectionError:
|
except ClientConnectionError:
|
||||||
await self.set_switches_unreachable()
|
await self.set_switches_unreachable()
|
||||||
|
|
||||||
async def update_state(self):
|
async def update_state(self):
|
||||||
url = f"http://{self.hostname}:{self.port}"
|
pass
|
||||||
async with self._session.get(url, timeout=3) as resp:
|
#url = f"http://{self.hostname}:{self.port}"
|
||||||
if resp.status == 200:
|
#async with self._session.get(url, timeout=3) as resp:
|
||||||
result = await resp.json()
|
# if resp.status == 200:
|
||||||
await self.notify_switches(result)
|
# result = await resp.json()
|
||||||
else:
|
# await self.notify_switches(result)
|
||||||
await self.set_switches_unreachable()
|
# else:
|
||||||
|
# await self.set_switches_unreachable()
|
||||||
|
|
||||||
async def notify_switches(self, response):
|
async def notify_switches(self, response):
|
||||||
for i, switch in enumerate(self._switch_objects):
|
for i, switch in enumerate(self._switch_objects):
|
||||||
|
|||||||
Reference in New Issue
Block a user