fix how geni_available option is processed
[sfa.git] / sfa / planetlab / pldriver.py
index 7835a1d..31e37ec 100644 (file)
@@ -615,6 +615,10 @@ class PlDriver (Driver):
         # Adding the list_leases option to the caching key
         if options.get('list_leases'):
             version_string = version_string + "_"+options.get('list_leases', 'default')
+
+        # Adding geni_available to caching key
+        if options.get('geni_available'):
+            version_string = version_string + "_" + str(options.get('geni_available'))
     
         # look in cache first
         if cached_requested and self.cache and not slice_hrn:
@@ -749,8 +753,8 @@ class PlDriver (Driver):
             requested_lease = {}
             if not lease.get('lease_id'):
                requested_lease['hostname'] = xrn_to_hostname(lease.get('component_id').strip())
-               requested_lease['t_from'] = lease.get('t_from')
-               requested_lease['t_until'] = lease.get('t_until')
+               requested_lease['start_time'] = lease.get('start_time')
+               requested_lease['duration'] = lease.get('duration')
             else:
                kept_leases.append(int(lease['lease_id']))
             if requested_lease.get('hostname'):