[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEND] Allow TCP XMLRPC address:port to be configured, if enabled.
# HG changeset patch # User Alastair Tse <atse@xxxxxxxxxxxxx> # Date 1169726280 0 # Node ID ee1febe317f72957c2cf2142dc7cf0cc6c46647d # Parent 82c306ad212e3714cf9292611a0ddb8de7a3b5dc [XEND] Allow TCP XMLRPC address:port to be configured, if enabled. Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx> --- tools/examples/xend-config.sxp | 6 ++++++ tools/python/xen/xend/XendOptions.py | 12 ++++++++++++ tools/python/xen/xend/server/SrvServer.py | 5 ++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff -r 82c306ad212e -r ee1febe317f7 tools/examples/xend-config.sxp --- a/tools/examples/xend-config.sxp Thu Jan 25 10:34:17 2007 +0000 +++ b/tools/examples/xend-config.sxp Thu Jan 25 11:58:00 2007 +0000 @@ -58,6 +58,12 @@ (xend-relocation-server yes) #(xend-unix-path /var/lib/xend/xend-socket) + +# Address and port xend should use for the TCP XMLRPC interface, +# if xen-tcp-xmlrpc-server is set. +#(xen-tcp-xmlrpc-server-address 'localhost') +#(xen-tcp-xmlrpc-server-port 8006) + # Port xend should use for the HTTP interface, if xend-http-server is set. #(xend-port 8000) diff -r 82c306ad212e -r ee1febe317f7 tools/python/xen/xend/XendOptions.py --- a/tools/python/xen/xend/XendOptions.py Thu Jan 25 10:34:17 2007 +0000 +++ b/tools/python/xen/xend/XendOptions.py Thu Jan 25 11:58:00 2007 +0000 @@ -60,6 +60,10 @@ class XendOptions: xend_tcp_xmlrpc_server_default = 'no' + xend_tcp_xmlrpc_server_address_default = 'localhost' + + xend_tcp_xmlrpc_server_port_default = 8006 + xend_unix_xmlrpc_server_default = 'yes' """Default interface address xend listens at. """ @@ -154,6 +158,14 @@ class XendOptions: def get_xend_tcp_xmlrpc_server(self): return self.get_config_bool("xend-tcp-xmlrpc-server", self.xend_tcp_xmlrpc_server_default) + + def get_xend_tcp_xmlrpc_server_port(self): + return self.get_config_int("xend-tcp-xmlrpc-server-port", + self.xend_tcp_xmlrpc_server_port_default) + + def get_xend_tcp_xmlrpc_server_address(self): + return self.get_config_string("xend-tcp-xmlrpc-server-address", + self.xend_tcp_xmlrpc_server_address_default) def get_xend_unix_xmlrpc_server(self): return self.get_config_bool("xend-unix-xmlrpc-server", diff -r 82c306ad212e -r ee1febe317f7 tools/python/xen/xend/server/SrvServer.py --- a/tools/python/xen/xend/server/SrvServer.py Thu Jan 25 10:34:17 2007 +0000 +++ b/tools/python/xen/xend/server/SrvServer.py Thu Jan 25 11:58:00 2007 +0000 @@ -204,7 +204,10 @@ def _loadConfig(servers, root, reload): log.error('Xen-API server configuration %s is invalid.', api_cfg) if xoptions.get_xend_tcp_xmlrpc_server(): - servers.add(XMLRPCServer(XendAPI.AUTH_PAM, False, True)) + addr = xoptions.get_xend_tcp_xmlrpc_server_address() + port = xoptions.get_xend_tcp_xmlrpc_server_port() + servers.add(XMLRPCServer(XendAPI.AUTH_PAM, False, use_tcp = True, + host = addr, port = port)) if xoptions.get_xend_unix_xmlrpc_server(): servers.add(XMLRPCServer(XendAPI.AUTH_PAM, False)) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |