Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
Compose vfolder accept/delete message in client side
Browse files Browse the repository at this point in the history
  • Loading branch information
adrysn committed Sep 28, 2019
1 parent 7e4e973 commit 6618db7
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/ai/backend/client/cli/vfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,23 @@ def invitations():
# TODO: Let user can select access_key among many.
# Currently, the config objects holds only one key.
config = get_config()
result = session.VFolder.accept_invitation(
invitations[selection]['id'], config.access_key)
print(result['msg'])
session.VFolder.accept_invitation(invitations[selection]['id'],
config.access_key)
msg = (
'You can now access vfolder {}'.format(
invitations[selection]['id']
)
)
print(msg)
break
elif action.lower() == 'r':
result = session.VFolder.delete_invitation(
invitations[selection]['id'])
print(result['msg'])
break
session.VFolder.delete_invitation(invitations[selection]['id'])
msg = (
'vfolder invitation rejected: {}'.format(
invitations[selection]['id']
)
)
print(msg)
elif action.lower() == 'c':
break
except Exception as e:
Expand Down

0 comments on commit 6618db7

Please sign in to comment.