mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Make domain creation work with XML. Fix typo
This commit is contained in:
parent
be6c1e91f8
commit
0d90e4bb46
3 changed files with 11 additions and 5 deletions
|
|
@ -74,10 +74,10 @@ def create_instance(request, compute_id):
|
|||
delete_flavor.delete()
|
||||
return HttpResponseRedirect(request.get_full_path())
|
||||
if 'create_xml' in request.POST:
|
||||
xml = request.POST.get('from_xml', '')
|
||||
xml = request.POST.get('dom_xml', '')
|
||||
try:
|
||||
name = util.get_xml_path(xml, '/domain/name')
|
||||
except util.etree.ParserError:
|
||||
except util.etree.Error as err:
|
||||
name = None
|
||||
if name in instances:
|
||||
error_msg = _("A virtual machine with this name already exists")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue