XM/XenAPI: Add cdrom support when creating domains by xm through Xen API.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
This commit is contained in:
Keir Fraser committed 2008-05-13 09:48:55 +01:00
1 parent 61341026d9
commit be2dc0b642
1 file changed
+5 -2
+5 -2
View File
@@ -31,6 +31,7 @@ import xen.util.xsm.xsm as security
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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.