debug msgs
Thierry Parmentelat [Tue, 3 Jun 2014 15:05:47 +0000 (17:05 +0200)]
sfa/methods/Allocate.py
sfa/trust/credential.py

index 22dc13b..a7dc8f9 100644 (file)
@@ -45,6 +45,8 @@ class Allocate(Method):
         # the slivers should expire.
         expiration = datetime_to_string(the_credential.expiration)
         
+        self.api.logger.debug("Allocate, received expiration from credential: %s"%expiration)
+
         # make sure request is not empty
         slivers = RSpec(rspec).version.get_nodes_with_slivers()
         if not slivers:
index c1e55ee..bc3b353 100644 (file)
@@ -458,6 +458,7 @@ class Credential(object):
         append_sub(doc, cred, "target_urn", self.gidObject.get_urn())
         append_sub(doc, cred, "uuid", "")
         if not self.expiration:
+            logger.debug("Creating credential valid for %s s"%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())