mirror of
https://gitlab.com/fabinfra/fabaccess/pyfabapi.git
synced 2025-03-12 06:41:42 +01:00
16 lines
451 B
Python
16 lines
451 B
Python
import asyncio
|
|
import fabapi
|
|
|
|
|
|
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())
|