fabfire_adapter/test.py

16 lines
451 B
Python
Raw Normal View History

2021-12-09 21:54:22 +01:00
import asyncio
2021-09-19 20:35:34 +02:00
import fabapi
2021-12-09 21:54:22 +01:00
async def main():
boot = await fabapi.connect("localhost", 59661, "Testuser", "secret")
if boot:
ms = await boot.machineSystem().a_wait()
info = await ms.machineSystem.info().a_wait()
ma = await info.info.getMachineURN("urn:fabaccess:resource:Another").a_wait()
print(ma.machine)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())