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] XM/XenAPI: Add cdrom support when creatin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] XM/XenAPI: Add cdrom support when creating domains by xm through Xen API.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 May 2008 08:30:17 -0700
Delivery-date: Tue, 13 May 2008 08:30:32 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1210668535 -3600
# Node ID 9da75b15001555824e9951d8f5b0c6a73302a1ae
# Parent  90022855084754ad7800478a71ce0d7310b2f0fb
XM/XenAPI: Add cdrom support when creating domains by xm through Xen API.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
---
 tools/python/xen/xm/xenapi_create.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r 900228550847 -r 9da75b150015 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Tue May 13 09:48:40 2008 +0100
+++ b/tools/python/xen/xm/xenapi_create.py      Tue May 13 09:48:55 2008 +0100
@@ -31,6 +31,7 @@ import sys
 import sys
 import os
 import traceback
+import re
 
 def log(_, msg):
     #print "> " + msg
@@ -707,9 +708,11 @@ class sxp2xml:
             = get_child_by_name(vbd_sxp, "mode") != "w" \
               and "RO" or "RW"
         vbd.attributes["device"] \
-            = get_child_by_name(vbd_sxp, "dev")
+            = re.sub(":cdrom$", "", get_child_by_name(vbd_sxp, "dev"))
         vbd.attributes["bootable"] = "1"
-        vbd.attributes["type"] = "disk"
+        vbd.attributes["type"] \
+            = re.search(":cdrom$", get_child_by_name(vbd_sxp, "dev")) \
+              and "CD" or "disk"
         vbd.attributes["qos_algorithm_type"] = ""
 
         return vbd

_______________________________________________
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] XM/XenAPI: Add cdrom support when creating domains by xm through Xen API., Xen patchbot-unstable <=