#the lease to the requested leases list
duration_in_seconds = \
int(single_requested_lease['duration'])
- if duration_in_seconds >= self.iotlab_api.GetMinExperimentDurationInSec():
+ if duration_in_seconds >= self.iotlab_api.GetMinExperimentDurationInGranularity():
requested_lease_list.append(single_requested_lease)
return requested_lease_list
return requested_job_dict
- def _process_requested_jobs(self, rspec):
+ def _process_requested_xp_dict(self, rspec):
"""
Turns the requested leases and information into a dictionary
of requested jobs, grouped by starting time.
"""
requested_lease_list = self._get_requested_leases_list(rspec)
- logger.debug("IOTLABDRIVER _process_requested_jobs \
+ logger.debug("IOTLABDRIVER _process_requested_xp_dict \
requested_lease_list %s" % (requested_lease_list))
- job_dict = self._group_leases_by_start_time(requested_lease_list)
- logger.debug("IOTLABDRIVER _process_requested_jobs job_dict\
- %s" % (job_dict))
+ xp_dict = self._group_leases_by_start_time(requested_lease_list)
+ logger.debug("IOTLABDRIVER _process_requested_xp_dict xp_dict\
+ %s" % (xp_dict))
- return job_dict
+ return xp_dict
def create_sliver(self, slice_urn, slice_hrn, creds, rspec_string,
users, options):
#verify_slice_nodes returns nodes, but unused here. Removed SA 13/08/12.
#slices.verify_slice_nodes(sfa_slice, requested_slivers, peer)
- requested_job_dict = self._process_requested_jobs(rspec)
+ requested_xp_dict = self._process_requested_xp_dict(rspec)
- logger.debug("IOTLABDRIVER.PY \tcreate_sliver requested_job_dict %s "
+ logger.debug("IOTLABDRIVER.PY \tcreate_sliver requested_xp_dict %s "
% (requested_job_dict))
#verify_slice_leases returns the leases , but the return value is unused
#here. Removed SA 13/08/12
def update(self, old_sfa_record, new_sfa_record, hrn, new_key):
"""
- No site or node record update allowed in Iotlab.
- The only modifications authorized here are key deletion/addition
- on an existing user and password change.
- On an existing user, CAN NOT BE MODIFIED:
- 'first_name', 'last_name', 'email'
- DOES NOT EXIST IN SENSLAB:
- 'phone', 'url', 'bio','title', 'accepted_aup',
- A slice is bound to its user, so modifying the user's ssh key should
- modify the slice's GID after an import procedure.
+ No site or node record update allowed in Iotlab. The only modifications
+ authorized here are key deletion/addition on an existing user and
+ password change. On an existing user, CAN NOT BE MODIFIED: 'first_name',
+ 'last_name', 'email'. DOES NOT EXIST IN SENSLAB: 'phone', 'url', 'bio',
+ 'title', 'accepted_aup'. A slice is bound to its user, so modifying the
+ user's ssh key should nmodify the slice's GID after an import procedure.
:param old_sfa_record: what is in the db for this hrn
- :param new_sfa_record: what was passed to the Update call
+ :param new_sfa_record: what was passed to the update call
:param new_key: the new user's public key
:param hrn: the user's sfa hrn
- :type old_sfa_record: dictionary
- :type new_sfa_record: dictionary
- :type pub_key: string
+ :type old_sfa_record: dict
+ :type new_sfa_record: dict
+ :type new_key: string
:type hrn: string
- TODO: needs review
- .. seealso::: update in driver.py.
+ TODO: needs review
+ .. seealso:: update in driver.py.
"""
pointer = old_sfa_record['pointer']
def remove(self, sfa_record):
"""
- Removes users only. Mark the user as disabled in
- LDAP. The user and his slice are then deleted from the
- db by running an import on the registry.
+ Removes users only. Mark the user as disabled in LDAP. The user and his
+ slice are then deleted from the db by running an import on the registry.
:param sfa_record: record is the existing sfa record in the db
:type sfa_record: dict
..warning::As fas as the slice is concerned, here only the leases are
removed from the slice. The slice is record itself is not removed
from the db.
+
TODO: needs review
TODO : REMOVE SLICE FROM THE DB AS WELL? SA 14/05/2013,