cosmetic
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 22 Oct 2010 08:36:01 +0000 (10:36 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 22 Oct 2010 08:36:01 +0000 (10:36 +0200)
sfa/client/sfi.py
sfa/util/xmlrpcprotocol.py

index ceb790a..8190203 100755 (executable)
@@ -375,6 +375,7 @@ class Sfi:
             gid = GID(filename=file)
         return gid
 
+    # xxx opts unused
     def get_gid(self, opts, args):
         """
         Get the specify gid and save it to file
@@ -498,6 +499,7 @@ class Sfi:
     
        return key_string
 
+    # xxx opts undefined
     def get_component_server_from_hrn(self, hrn):
         # direct connection to the nodes component manager interface
         user_cred = self.get_user_cred().save_to_string(save_parents=True)
@@ -507,12 +509,11 @@ class Sfi:
             self.logger.warning("No such component:%r"% opts.component)
         record = records[0]
   
-        return self.get_server(record['hostname'], CM_PORT, self.key_file, \
-                               self.cert_file, self.options)
+        return self.get_server(record['hostname'], CM_PORT, self.key_file, self.cert_file)
  
     def get_server(self, host, port, keyfile, certfile):
         """
-        Return an instnace of an xmlrpc server connection    
+        Return an instance of an xmlrpc server connection    
         """
         # port is appended onto the domain, before the path. Should look like:
         # http://domain:port/path
@@ -521,6 +522,7 @@ class Sfi:
         url =  "http://%s" %  "/".join(host_parts)    
         return xmlrpcprotocol.get_server(url, keyfile, certfile, self.options)
 
+    # xxx opts could be retrieved in self.options
     def get_server_from_opts(self, opts):
         """
         Return instance of an xmlrpc connection to a slice manager, aggregate
index 43c957a..6c9918b 100644 (file)
@@ -49,14 +49,14 @@ class XMLRPCTransport(xmlrpclib.Transport):
 
 class XMLRPCServerProxy(xmlrpclib.ServerProxy):
     def __init__(self, url, transport, allow_none=True, options=None):
-        self.options = options
         verbose = False
-        if self.options and self.options.debug:
+        if options and options.debug:
             verbose = True
+        sfa_logger().info ("Connecting to xmlrpcserver at %s (with verbose=%s)"%(url,verbose))
         xmlrpclib.ServerProxy.__init__(self, url, transport, allow_none=allow_none, verbose=verbose)
 
     def __getattr__(self, attr):
-        sfa_logger().debug("Calling xml-rpc method:%s"%attr)
+        sfa_logger().info ("Calling xml-rpc method:%s"%attr)
         return xmlrpclib.ServerProxy.__getattr__(self, attr)