renew returns a list of structs
[sfa.git] / sfa / planetlab / pldriver.py
index b133dc8..138e254 100644 (file)
@@ -710,11 +710,10 @@ class PlDriver (Driver):
         slice = slices[0]
         requested_time = utcparse(expiration_time)
         record = {'expires': int(datetime_to_epoch(requested_time))}
-        try:
-            self.shell.UpdateSlice(slice['slice_id'], record)
-            return True
-        except:
-            return False
+        self.shell.UpdateSlice(slice['slice_id'], record)
+        description = self.describe(urns, None, options)
+        return description['geni_slivers']
+            
 
     def perform_operational_action (self, urns, action, options={}):
         # MyPLC doesn't support operational actions. Lets pretend like it
@@ -726,7 +725,7 @@ class PlDriver (Driver):
         # fault if sliver is not full allocated (operational status is geni_pending_allocation)
         description = self.describe(urns, None, options)
         for sliver in description['geni_slivers']:
-            if sliver['operational_status'] == 'geni_pending_allocation':
+            if sliver['geni_operational_status'] == 'geni_pending_allocation':
                 raise UnsupportedOperation(action, "Sliver must be fully allocated (operational status is not geni_pending_allocation)")
         #
         # Perform Operational Action Here