X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fiotlab%2Fiotlabdriver.py;h=a820fc697259dcd376dd68c6d93c902e1ff681f8;hb=c9a9d0d6cc1a372fc34011e27883c58c244a9824;hp=fc7c7c2752c3d1193d64d22c53b47a7d537e80cc;hpb=8e558be62ca1e048cedb76d6036d1acbfa827bd4;p=sfa.git diff --git a/sfa/iotlab/iotlabdriver.py b/sfa/iotlab/iotlabdriver.py index fc7c7c27..a820fc69 100644 --- a/sfa/iotlab/iotlabdriver.py +++ b/sfa/iotlab/iotlabdriver.py @@ -99,9 +99,9 @@ class IotLabDriver(Driver): 'geni_slivers': desc['geni_slivers']} return status - def _get_users(self): + def _get_users(self, email=None): """ Get all users """ - ret = self.shell.get_users() + ret = self.shell.get_users(email) if 'error' in ret: return None return ret @@ -110,10 +110,10 @@ class IotLabDriver(Driver): """ Get user login with email """ email = caller_user['email'] # ensure user exist in LDAP tree - users = self._get_users() - if users and email not in users: + users = self._get_users(email) + if email not in users: self.shell.add_user(caller_user) - users = self._get_users() + users = self._get_users(email) if users and email in users: return users[email]['login'] else: @@ -194,6 +194,7 @@ class IotLabDriver(Driver): # parse rspec rspec = RSpec(rspec_string) + logger.warning(options) caller_hrn = options.get('actual_caller_hrn', []) geni_users = options.get('geni_users', []) caller_user = [user for user in geni_users if @@ -206,11 +207,12 @@ class IotLabDriver(Driver): if login: nodes_list, start_time, duration = \ self._get_experiment(rspec) + # [0-9A-Za-z_] with onelab.inria.test_iotlab + exp_name = '_'.join((xrn.hrn.replace('\\.','')).split('.')) logger.warning("iotlabdriver allocate submit OAR job :" " %s %s %s %s" % - (xrn.hrn, start_time, duration, nodes_list)) - # [0-9A-Za-z_] with onelab.inria.test_iotlab - exp_name = '_'.join((xrn.hrn).split('.')) + (exp_name, start_time, duration, nodes_list)) + # submit OAR job ret = self.shell.reserve_nodes(login, exp_name,