From 3d25242d4cc213946a60fea1cab118affd3487a9 Mon Sep 17 00:00:00 2001 From: Josh Karlin Date: Tue, 12 Oct 2010 14:47:30 -0400 Subject: [PATCH] Fixed default credential time in credential.py to two weeks --- sfa/managers/slice_manager_pl.py | 4 ++-- sfa/trust/credential.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sfa/managers/slice_manager_pl.py b/sfa/managers/slice_manager_pl.py index 45d961c2..0c81f37d 100644 --- a/sfa/managers/slice_manager_pl.py +++ b/sfa/managers/slice_manager_pl.py @@ -35,10 +35,10 @@ def slice_status(api, slice_xrn, creds ): # 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'], diff --git a/sfa/trust/credential.py b/sfa/trust/credential.py index c09f1bf9..b46a6554 100644 --- a/sfa/trust/credential.py +++ b/sfa/trust/credential.py @@ -399,7 +399,7 @@ class Credential(object): 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") -- 2.47.0