ia64/xen-unstable
changeset 10489:1297dc315308
Use an environmental variable (XM_SERVER) to determine XML-RPC URI.
This allows users to invoke xm against a remote server. This is much more
useful though for exercising XML-RPC transports with xm-test though since
xm-test will continue to (mostly) function if the URI is localhost.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This allows users to invoke xm against a remote server. This is much more
useful though for exercising XML-RPC transports with xm-test though since
xm-test will continue to (mostly) function if the URI is localhost.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
author | anthony@rhesis.austin.ibm.com |
---|---|
date | Tue Jun 20 10:25:22 2006 +0100 (2006-06-20) |
parents | c2cbcccc44f4 |
children | 7172935d10d4 |
files | tools/python/xen/xend/XendClient.py |
line diff
1.1 --- a/tools/python/xen/xend/XendClient.py Tue Jun 20 10:25:21 2006 +0100 1.2 +++ b/tools/python/xen/xend/XendClient.py Tue Jun 20 10:25:22 2006 +0100 1.3 @@ -18,6 +18,7 @@ 1.4 #============================================================================ 1.5 1.6 from xen.util.xmlrpclib2 import ServerProxy 1.7 +import os 1.8 1.9 XML_RPC_SOCKET = "/var/run/xend/xmlrpc.sock" 1.10 1.11 @@ -25,4 +26,8 @@ ERROR_INTERNAL = 1 1.12 ERROR_GENERIC = 2 1.13 ERROR_INVALID_DOMAIN = 3 1.14 1.15 -server = ServerProxy('httpu:///var/run/xend/xmlrpc.sock') 1.16 +uri = 'httpu:///var/run/xend/xmlrpc.sock' 1.17 +if os.environ.has_key('XM_SERVER'): 1.18 + uri = os.environ['XM_SERVER'] 1.19 + 1.20 +server = ServerProxy(uri)