From: Anthony Liguori <aliguori@us.ibm.com>
To: xen-devel <xen-devel@lists.xensource.com>
Cc: Ewan Mellor <ewan@xensource.com>
Subject: [PATCH 3/3] Let xm user choose XML-RPC URI
Date: Sat, 10 Jun 2006 14:39:45 -0500 [thread overview]
Message-ID: <448B2001.1070203@us.ibm.com> (raw)
In-Reply-To: <448B1EF2.5050801@us.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 137 bytes --]
This patch let's a user (via the XM_SERVER environment variable) choose
which XML-RPC URI is used within xm.
Regards,
Anthony Liguori
[-- Attachment #2: xm_server.diff --]
[-- Type: text/plain, Size: 1181 bytes --]
# HG changeset patch
# User anthony@rhesis.austin.ibm.com
# Node ID f8fcaee58fc1f7e13ae8443336a80de4c4e50538
# Parent 03bbc156d3e8fb01eee2af990176bb64e012c4e1
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>
diff -r 03bbc156d3e8 -r f8fcaee58fc1 tools/python/xen/xend/XendClient.py
--- a/tools/python/xen/xend/XendClient.py Sat Jun 10 19:16:33 2006
+++ b/tools/python/xen/xend/XendClient.py Sat Jun 10 19:19:02 2006
@@ -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_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)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2006-06-10 19:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-10 19:35 [PATCH 0/3] Add support for XML-RPC over SSH Anthony Liguori
2006-06-10 19:37 ` [PATCH 1/3] Add an xm serve command Anthony Liguori
2006-06-10 19:38 ` [PATCH 2/3] Add SSH over XML-RPC support to xmlrpclib2.ServerProxy Anthony Liguori
2006-06-10 19:39 ` Anthony Liguori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=448B2001.1070203@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=ewan@xensource.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.