X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fiotlab%2Fiotlabshell.py;h=605fa98d43a93f3ebdc532a53c03e289b469968d;hb=4a9e6751f9f396f463932133b9d62fc925a99ef6;hp=0741c55ab799e9d29b0448f947e44214db067dc2;hpb=f9f2e0b15b69c17b4627723d62280718a0a6af92;p=sfa.git diff --git a/sfa/iotlab/iotlabshell.py b/sfa/iotlab/iotlabshell.py index 0741c55a..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): @@ -97,6 +97,7 @@ class IotLABShell(object): """ # pylint:disable=W0212,R0913,E1123 logger.warning("iotlashell reserve_nodes") + logger.info("login=%s, exp_name=%s, nodes_list=%s, start_time=%s, duration=%s" % (login, exp_name, nodes_list, start_time, duration)) exp_file = helpers.FilesDict() _experiment = experiment._Experiment(exp_name, duration, start_time) _experiment.type = 'physical' @@ -151,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) @@ -164,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]