WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Use an environmental variable (XM_SERVER)

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Use an environmental variable (XM_SERVER) to determine XML-RPC URI.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Jun 2006 15:01:40 +0000
Delivery-date: Tue, 20 Jun 2006 08:04:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User anthony@xxxxxxxxxxxxxxxxxxxxx
# Node ID 1297dc3153088f625b477f7f00a78347591e40f4
# Parent  c2cbcccc44f4252e85ab361f5abbcbe3f3cb3007
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@xxxxxxxxxx>
---
 tools/python/xen/xend/XendClient.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -r c2cbcccc44f4 -r 1297dc315308 tools/python/xen/xend/XendClient.py
--- a/tools/python/xen/xend/XendClient.py       Tue Jun 20 10:25:21 2006 +0100
+++ b/tools/python/xen/xend/XendClient.py       Tue Jun 20 10:25:22 2006 +0100
@@ -18,6 +18,7 @@
 #============================================================================
 
 from xen.util.xmlrpclib2 import ServerProxy
+import os
 
 XML_RPC_SOCKET = "/var/run/xend/xmlrpc.sock"
 
@@ -25,4 +26,8 @@ ERROR_GENERIC = 2
 ERROR_GENERIC = 2
 ERROR_INVALID_DOMAIN = 3
 
-server = ServerProxy('httpu:///var/run/xend/xmlrpc.sock')
+uri = 'httpu:///var/run/xend/xmlrpc.sock'
+if os.environ.has_key('XM_SERVER'):
+    uri = os.environ['XM_SERVER']
+
+server = ServerProxy(uri)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Use an environmental variable (XM_SERVER) to determine XML-RPC URI., Xen patchbot-unstable <=