Make work

This commit is contained in:
Nadja Reitzenstein 2022-04-28 20:59:36 +02:00
parent c8ed03caec
commit 286aca0472
2 changed files with 6 additions and 4 deletions

@ -1 +1 @@
Subproject commit f02afb3736d1d2d868787168c9b281e5a4058f78
Subproject commit 244eb9bd1b59cfcf36c067ff0d6208c0992766ba

View File

@ -4,8 +4,8 @@ import fabapi.user_system
async def main():
session = await fabapi.connect("localhost", 59661, "Testuser", "secret")
info = await session.machineSystem.info().a_wait()
ma = await info.info.getMachineURN("urn:fabaccess:resource:Another").a_wait()
info = session.machineSystem.info
ma = await info.getMachineURN("urn:fabaccess:resource:Another").a_wait()
print(ma)
# Add an user with the given roles
@ -13,9 +13,11 @@ async def main():
"somerole", "testrole"
]
user = await fabapi.user_system.add_user(session.userSystem, "ANewUser", "ANewSecret", roles=roles)
print("ANewUser obj: ", user)
# As you can see, Roles were attached
await user.info.listRoles().a_wait()
r = await user.info.listRoles().a_wait()
print("ANewUser roles: ", r)
# Delete the same user again
await fabapi.user_system.del_user(session.userSystem, "ANewUser")