#Deleted leases are the ones with lease id not declared in the Rspec
if deleted_leases:
self.driver.testbed_shell.DeleteLeases(deleted_leases,
- sfa_slice['user']['uid'])
+ sfa_slice['login'])
+ #self.driver.testbed_shell.DeleteLeases(deleted_leases,
+ # sfa_slice['user']['uid'])
logger.debug("IOTLABSLICES \
verify_slice_leases slice %s deleted_leases %s"
% (sfa_slice, deleted_leases))
'node_list': [],
'authority': slice_record['authority'],
'gid': slice_record['gid'],
- 'slice_id': slice_record['record_id'],
+ #'slice_id': slice_record['record_id'],
'reg-researchers': slice_record['reg-researchers'],
- 'peer_authority': str(sfa_peer)
+ 'urn': hrn_to_urn(slicename,'slice'),
+ #'peer_authority': str(sfa_peer)
}
if ldap_user:
return sfa_slice
- def verify_persons(self, slice_hrn, slice_record, users, options={}):
+ def verify_persons(self, slice_hrn, slice_record, users, options=None):
"""Ensures the users in users list exist and are enabled in LDAP. Adds
person if needed (AddPerson).
"""
+ slice_user = slice_record['user']
+ if options is None: options={}
logger.debug("IOTLABSLICES \tverify_persons \tslice_hrn %s \
\t slice_record %s\r\n users %s \t "
% (slice_hrn, slice_record, users))
#Check user i in LDAP with GetPersons
#Needed because what if the user has been deleted in LDAP but
#is still in SFA?
+ # GetPersons -> LdapFindUser -> _process_ldap_info_for_one_user
existing_users = self.driver.testbed_shell.GetPersons(filter_user)
logger.debug(" \r\n IOTLABSLICES.PY \tverify_person filter_user %s\
existing_users %s "
users_dict[user['email']].update(user)
existing_user_emails.append(
users_dict[user['email']]['email'])
-
+ logger.debug("User is in iotlab LDAP slice_record[user] = %s" % slice_user)
# User from another known trusted federated site. Check
# if a iotlab account matching the email has already been created.
else:
req += users['email']
ldap_reslt = self.driver.testbed_shell.ldap.LdapSearch(req)
-
+ logger.debug("LdapSearch slice_record[user] = %s" % slice_user)
if ldap_reslt:
logger.debug(" IOTLABSLICES.PY \tverify_person users \
USER already in Iotlab \t ldap_reslt %s \
" % (ldap_reslt))
existing_users.append(ldap_reslt[1])
-
+ logger.debug("ldap_reslt slice_record[user] = %s" % slice_user)
else:
#User not existing in LDAP
logger.debug("IOTLABSLICES.PY \tverify_person users \
return added_persons
- def verify_keys(self, persons, users, peer, options={}):
+ def verify_keys(self, persons, users, peer, options=None):
"""
.. warning:: unused
"""
+ if options is None: options={}
# existing keys
key_ids = []
for person in persons: