|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-3.1-testing] xend: Fix name/uuid uniqueness checks.
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1191315846 -3600
# Node ID a86cf1d18625644eb04a50a6b65c7154d3e18b81
# Parent d92bb1cd352cf1fa8f8fadfd718ae803c74193fd
xend: Fix name/uuid uniqueness checks.
Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
xen-unstable changeset: 15998:a345f989722649ba01701babf60e49517e910102
xen-unstable date: Tue Oct 02 10:01:10 2007 +0100
---
tools/python/xen/xend/XendDomainInfo.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff -r d92bb1cd352c -r a86cf1d18625 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Tue Oct 02 10:03:28 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py Tue Oct 02 10:04:06 2007 +0100
@@ -74,9 +74,15 @@ def create(config):
@return: An up and running XendDomainInfo instance
@raise VmError: Invalid configuration or failure to start.
"""
-
+ from xen.xend import XendDomain
+ domconfig = XendConfig.XendConfig(sxp_obj = config)
+ othervm = XendDomain.instance().domain_lookup_nr(domconfig["name_label"])
+ if othervm is None or othervm.domid is None:
+ othervm = XendDomain.instance().domain_lookup_nr(domconfig["uuid"])
+ if othervm is not None and othervm.domid is not None:
+ raise VmError("Domain '%s' already exists with ID '%d'" %
(domconfig["name_label"], othervm.domid))
log.debug("XendDomainInfo.create(%s)", scrub_password(config))
- vm = XendDomainInfo(XendConfig.XendConfig(sxp_obj = config))
+ vm = XendDomainInfo(domconfig)
try:
vm.start()
except:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-3.1-testing] xend: Fix name/uuid uniqueness checks.,
Xen patchbot-3.1-testing <=
|
|
|
|
|