X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fiotlab%2Fiotlabshell.py;h=605fa98d43a93f3ebdc532a53c03e289b469968d;hb=HEAD;hp=105d12038f380bcf37ef5d2172c0b42d72eea368;hpb=d03b1ccab2798adaaad0511540dbc2b2657cf849;p=sfa.git diff --git a/sfa/iotlab/iotlabshell.py b/sfa/iotlab/iotlabshell.py index 105d1203..605fa98d 100644 --- a/sfa/iotlab/iotlabshell.py +++ b/sfa/iotlab/iotlabshell.py @@ -6,7 +6,7 @@ from iotlabcli import auth from iotlabcli import rest from iotlabcli import helpers from iotlabcli import experiment -from urllib2 import HTTPError +from urllib.error import HTTPError class IotLABShell(object): @@ -152,7 +152,20 @@ class IotLABShell(object): def add_user(self, slice_user): """ Add LDAP user + { + "firstName":"loic", + "lastName":"test", + "email":"loic.test@lip6.fr", + "organization":"SFA", + "city":"To be defined", + "country":"To be defined", + "motivations":"SFA federation", + "category":"Academic", + "type": "SA", + "sshPublicKey": "ssh-rsa AAAAB3Nz..." + } """ + # pylint:disable=E1123 logger.warning("iotlashell add_user") logger.warning("slice_user: %s" % slice_user) @@ -165,7 +178,9 @@ class IotLABShell(object): "city": "To be defined", "country": "To be defined", "motivations": "SFA federation", - "organization": organization} + "organization": organization, + "category":"Academic" + } email = slice_user['email'] user['email'] = email user['sshPublicKey'] = slice_user['keys'][0]