From: Jim Fehlig <jfehlig@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH][XenAPI] Implement VBD.set_mode
Date: Tue, 12 Jun 2007 15:52:31 -0600 [thread overview]
Message-ID: <466F159F.9030203@novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 135 bytes --]
This patch implements the XenAPI method VBD.set_mode in xend. This
method is already implemented in XenAPI c-bindings.
Regards,
Jim
[-- Attachment #2: xenapi_vbd_setmode.patch --]
[-- Type: text/x-patch, Size: 1125 bytes --]
# HG changeset patch
# User Jim Fehlig <jfehlig@novell.com>
# Date 1181684926 21600
# Node ID b1ffa0282ce1c94db7df4e751e16e13ba1aef14c
# Parent 93f77a5a8437df0b34919a6987f48e84342b4a43
Implement XenAPI method VBD.set_mode.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
diff -r 93f77a5a8437 -r b1ffa0282ce1 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Sun Jun 10 19:58:22 2007 +0100
+++ b/tools/python/xen/xend/XendAPI.py Tue Jun 12 15:48:46 2007 -0600
@@ -1887,6 +1887,17 @@ class XendAPI(object):
xd.managed_config_save(vm)
return xen_api_success_void()
+ def VBD_set_mode(self, session, vbd_ref, mode):
+ if mode == 'RW':
+ mode = 'w'
+ else:
+ mode = 'r'
+ xd = XendDomain.instance()
+ vm = xd.get_vm_with_dev_uuid('vbd', vbd_ref)
+ vm.set_dev_property('vbd', vbd_ref, 'mode', mode)
+ xd.managed_config_save(vm)
+ return xen_api_success_void()
+
def VBD_get_all(self, session):
xendom = XendDomain.instance()
vbds = [d.get_vbds() for d in XendDomain.instance().list('all')]
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2007-06-12 21:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=466F159F.9030203@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.