gid = GID(filename=file)
return gid
+ # xxx opts unused
def get_gid(self, opts, args):
"""
Get the specify gid and save it to file
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)
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
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
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)