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
# 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