From: Loic Baron Date: Tue, 6 Feb 2018 16:25:10 +0000 (+0100) Subject: FIT IoT-Lab requires organization of new users: generate one from the urn X-Git-Tag: sfa-3.1-22~5 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=45ced23005cf8f27b0a5dc71e80d73ebca598e83 FIT IoT-Lab requires organization of new users: generate one from the urn --- diff --git a/sfa/iotlab/iotlabshell.py b/sfa/iotlab/iotlabshell.py index ac600970..101de84a 100644 --- a/sfa/iotlab/iotlabshell.py +++ b/sfa/iotlab/iotlabshell.py @@ -150,11 +150,17 @@ class IotLABShell(object): """ # pylint:disable=E1123 logger.warning("iotlashell add_user") + logger.warning("slice_user: %s" % slice_user) + if 'urn' in slice_user: + organization = slice_user['urn'] + else: + organization = "SFA federation" # single account creation user = {"type": "SA", "city": "To be defined", "country": "To be defined", - "motivations": "SFA federation"} + "motivations": "SFA federation", + "organization": organization} email = slice_user['email'] user['email'] = email user['sshPublicKey'] = slice_user['keys'][0]