# find out where this slice is currently running
api.logger.info(hrn)
slicename = hrn_to_pl_slicename(hrn)
-
+ api.logger.info("Checking status for %s" % slicename)
slices = api.plshell.GetSlices(api.plauth, [slicename], ['node_ids','person_ids','name','expires'])
if len(slices) == 0:
- raise Exception("Slice %s not found (used %s as slicename internally)" % slice_xrn, slicename)
+ raise Exception("Slice %s not found (used %s as slicename internally)" % (slice_xrn, slicename))
slice = slices[0]
nodes = api.plshell.GetNodes(api.plauth, slice['node_ids'],
append_sub(doc, cred, "target_urn", self.gidObject.get_urn())
append_sub(doc, cred, "uuid", "")
if not self.expiration:
- self.set_expiration(datetime.datetime.utcnow() + datetime.timedelta(DEFAULT_CREDENTIAL_LIFETIME))
+ self.set_expiration(datetime.datetime.utcnow() + datetime.timedelta(seconds=DEFAULT_CREDENTIAL_LIFETIME))
self.expiration = self.expiration.replace(microsecond=0)
append_sub(doc, cred, "expires", self.expiration.isoformat())
privileges = doc.createElement("privileges")