2010-09-28 00:07:21 +02:00
|
|
|
Index: xen-4.0.1-testing/tools/python/xen/xm/create.py
|
2009-10-12 16:04:55 +02:00
|
|
|
===================================================================
|
2010-09-28 00:07:21 +02:00
|
|
|
--- xen-4.0.1-testing.orig/tools/python/xen/xm/create.py
|
|
|
|
+++ xen-4.0.1-testing/tools/python/xen/xm/create.py
|
2010-01-16 01:12:54 +01:00
|
|
|
@@ -36,7 +36,7 @@ from xen.xend.server.DevConstants import
|
2009-10-12 16:04:55 +02:00
|
|
|
from xen.util import blkif
|
|
|
|
from xen.util import vscsi_util
|
|
|
|
import xen.util.xsm.xsm as security
|
|
|
|
-from xen.xm.main import serverType, SERVER_XEN_API, get_single_vm
|
|
|
|
+from xen.xm.main import serverType, SERVER_XEN_API, SERVER_LEGACY_XMLRPC, get_single_vm
|
2010-01-16 01:12:54 +01:00
|
|
|
from xen.util import utils, auxbin
|
|
|
|
from xen.util.pci import dev_dict_to_sxp, \
|
|
|
|
parse_pci_name_extended, PciDeviceParseError
|
2010-09-28 00:07:21 +02:00
|
|
|
@@ -1522,7 +1522,7 @@ def main(argv):
|
2009-10-12 16:04:55 +02:00
|
|
|
except IOError, exn:
|
|
|
|
raise OptionError("Cannot read file %s: %s" % (config, exn[1]))
|
|
|
|
|
|
|
|
- if serverType == SERVER_XEN_API:
|
|
|
|
+ if serverType == SERVER_XEN_API or serverType == SERVER_LEGACY_XMLRPC:
|
|
|
|
from xen.xm.xenapi_create import sxp2xml
|
|
|
|
sxp2xml_inst = sxp2xml()
|
|
|
|
doc = sxp2xml_inst.convert_sxp_to_xml(config, transient=True)
|
2010-09-28 00:07:21 +02:00
|
|
|
@@ -1530,7 +1530,7 @@ def main(argv):
|
2009-10-12 16:04:55 +02:00
|
|
|
if opts.vals.dryrun and not opts.is_xml:
|
|
|
|
SXPPrettyPrint.prettyprint(config)
|
|
|
|
|
|
|
|
- if opts.vals.xmldryrun and serverType == SERVER_XEN_API:
|
|
|
|
+ if opts.vals.xmldryrun:
|
|
|
|
from xml.dom.ext import PrettyPrint as XMLPrettyPrint
|
|
|
|
XMLPrettyPrint(doc)
|
|
|
|
|
2010-09-28 00:07:21 +02:00
|
|
|
Index: xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py
|
2010-08-01 17:25:18 +02:00
|
|
|
===================================================================
|
2010-09-28 00:07:21 +02:00
|
|
|
--- xen-4.0.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py
|
|
|
|
+++ xen-4.0.1-testing/tools/python/xen/xend/XendAPIConstants.py
|
2010-08-01 17:25:18 +02:00
|
|
|
@@ -45,8 +45,10 @@ XEN_API_ON_NORMAL_EXIT = [
|
|
|
|
XEN_API_ON_CRASH_BEHAVIOUR = [
|
|
|
|
'destroy',
|
|
|
|
'coredump_and_destroy',
|
|
|
|
+ 'coredump_destroy',
|
|
|
|
'restart',
|
|
|
|
'coredump_and_restart',
|
|
|
|
+ 'coredump_restart',
|
|
|
|
'preserve',
|
|
|
|
'rename_restart'
|
|
|
|
]
|