parent
1924154dce
commit
d4dc3ac649
|
@ -166,6 +166,10 @@ def define_vm(zk_conn, config_data, target_node, node_limit, node_selector, node
|
||||||
dom_uuid = parsed_xml.uuid.text
|
dom_uuid = parsed_xml.uuid.text
|
||||||
dom_name = parsed_xml.name.text
|
dom_name = parsed_xml.name.text
|
||||||
|
|
||||||
|
# Ensure that the UUID and name are unique
|
||||||
|
if searchClusterByUUID(dom_uuid) or searchClusterByName(dom_name):
|
||||||
|
return False, 'ERROR: Specified VM "{}" or UUID "{}" matches an existing VM on the cluster'.format(dom_name, dom_uuid)
|
||||||
|
|
||||||
if not target_node:
|
if not target_node:
|
||||||
target_node = common.findTargetNode(zk_conn, dom_uuid)
|
target_node = common.findTargetNode(zk_conn, dom_uuid)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue