cosmetic
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 6 Apr 2011 15:53:03 +0000 (17:53 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 6 Apr 2011 15:53:03 +0000 (17:53 +0200)
sfa/client/sfi.py
sfa/util/method.py
sfa/util/sfaticket.py
sfa/util/storage.py
sfa/util/xmlrpcprotocol.py
wsdl/Makefile

index 241d8e1..61730d0 100755 (executable)
@@ -23,7 +23,6 @@ from sfa.trust.credential import Credential
 from sfa.util.sfaticket import SfaTicket
 from sfa.util.record import SfaRecord, UserRecord, SliceRecord, NodeRecord, AuthorityRecord
 from sfa.util.xrn import Xrn, get_leaf, get_authority, hrn_to_urn
-from sfa.util.xmlrpcprotocol import ServerException
 import sfa.util.xmlrpcprotocol as xmlrpcprotocol
 from sfa.util.config import Config
 from sfa.util.version import version_core
@@ -717,7 +716,7 @@ class Sfi:
         elif record['type'] in ["slice"]:
             try:
                 cred = self.get_slice_cred(record.get_name()).save_to_string(save_parents=True)
-            except ServerException, e:
+            except xmlrpcprotocol.ServerException, e:
                # XXX smbaker -- once we have better error return codes, update this
                # to do something better than a string compare
                if "Permission error" in e.args[0]:
index c5dc1e6..24ab75e 100644 (file)
@@ -79,12 +79,13 @@ class Method:
             for name, value, expected in zip(max_args, args, self.accepts):
                 self.type_check(name, value, expected, args)
 
+            if self.api.config.SFA_API_DEBUG:
+                sfa_logger().debug("method.__call__ calling method %s"%methodname)
             result = self.call(*args, **kwds)
-            runtime = time.time() - start
 
+            runtime = time.time() - start
             if self.api.config.SFA_API_DEBUG or hasattr(self, 'message'):
-                msg=getattr(self,'message',"method %s completed in %02f s"%(methodname,runtime))
-                sfa_logger().debug(msg)
+                sfa_logger().debug("method.__call__ %s completed in %02f s (%s)"%(methodname,runtime,getattr(self,'message',"[no-msg]")))
 
             return result
 
index e4486d1..0be5d93 100644 (file)
@@ -2,9 +2,6 @@
 # implements SFA tickets
 #
 
-### $Id$
-### $URL$
-
 import xmlrpclib
 
 from sfa.trust.certificate import Certificate
index 95ed8f5..5d91539 100644 (file)
@@ -1,6 +1,3 @@
-### $Id$
-### $URL$
-
 import os
 
 from sfa.util.rspec import RecordSpec
index 2ef9b60..69934e1 100644 (file)
@@ -58,11 +58,11 @@ class XMLRPCServerProxy(xmlrpclib.ServerProxy):
         verbose = False
         if options and options.debug:
             verbose = True
-        sfa_logger().info ("Connecting to xmlrpcserver at %s (with verbose=%s)"%(url,verbose))
+        sfa_logger().debug ("xmlrpcprotocol.XMLRPCServerProxy.__init__ %s (with verbose=%s)"%(url,verbose))
         xmlrpclib.ServerProxy.__init__(self, url, transport, allow_none=allow_none, verbose=verbose)
 
     def __getattr__(self, attr):
-        sfa_logger().info ("Calling xml-rpc method:%s"%attr)
+        sfa_logger().debug ("xmlrpcprotocol.XMLRPCServerProxy.__getattr__ on xml-rpc method:%s"%attr)
         return xmlrpclib.ServerProxy.__getattr__(self, attr)
 
 
index 5f3bd3e..c24b1e1 100644 (file)
@@ -57,3 +57,11 @@ install-clean:
 clean::
        rm -f $(HTMLS)
 
+
+backup:
+       $(foreach wsdl,$(WSDLS), cp $(wsdl) $(wsdl).bak;)
+       $(foreach html,$(HTMLS), cp $(html) $(html).bak;)
+
+diff:
+       $(foreach wsdl,$(WSDLS), diff $(wsdl) $(wsdl).bak;)
+       $(foreach html,$(HTMLS), diff $(html) $(html).bak;)