From: Jim Fehlig <jfehlig@novell.com>
To: Xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] [xend] Fix on-wire response for RPCs that return void
Date: Fri, 17 Nov 2006 16:34:41 -0700 [thread overview]
Message-ID: <455E4711.1030902@novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
The legacy apis return a value of None on success, which was being
converted to an illegal (as per Xen API spec) value of 'nil' in the
xmlrpc response. An example of the invalid on-wire response:
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>Status</name>
<value><string>Success</string></value>
</member>
<member>
<name>Value</name>
<value><nil/></value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
The Xen IPI spec states that destroy, hard_shutdown, pause, resume,
start, suspend, and unpause return void. This patch makes it so and
permits proper parsing of the response by clients (libxen) that follow
the spec.
Jim
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xend-success-retval.patch --]
[-- Type: text/x-patch; name="xend-success-retval.patch", Size: 1125 bytes --]
# HG changeset patch
# User jfehlig@jfehlig2.provo.novell.com
# Date 1163805674 25200
# Node ID 5d168b8e743a432ba719dbb990e77164c58b080d
# Parent f0ba459065d32b61c9d04ccde5787e48e23be782
The legacy apis return a value of None on success, which was being converted to a value of 'nil' in the xmlrpc response.
The Xen IPI spec states that destroy, hard_shutdown, pause, resume, start, suspend, and unpause return void. This patch makes it so and permits proper parsing of the response by clients (libxen) that follow the spec.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
diff -r f0ba459065d3 -r 5d168b8e743a tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Thu Nov 16 18:47:28 2006 -0800
+++ b/tools/python/xen/xend/XendAPI.py Fri Nov 17 16:21:14 2006 -0700
@@ -257,8 +257,8 @@ def do_vm_func(fn_name, vm_ref, *args):
"""
xendom = XendDomain.instance()
fn = getattr(xendom, fn_name)
- return xen_api_success(xendom.do_legacy_api_with_uuid(
- fn, vm_ref, *args))
+ xendom.do_legacy_api_with_uuid(fn, vm_ref, *args)
+ return xen_api_success_void()
class XendAPI:
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2006-11-17 23:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-17 23:34 Jim Fehlig [this message]
2006-11-22 14:10 ` [PATCH] [xend] Fix on-wire response for RPCs that return void Ewan Mellor
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=455E4711.1030902@novell.com \
--to=jfehlig@novell.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.