mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 15:45:23 +00:00
Check firmware secure keyword with safe way to prevent key not exist
This commit is contained in:
parent
d401d2f3ff
commit
c6cdb4929c
2 changed files with 2 additions and 1 deletions
|
@ -219,6 +219,7 @@ def create_instance(request, compute_id, arch, machine):
|
||||||
if data['cache_mode'] not in conn.get_cache_modes():
|
if data['cache_mode'] not in conn.get_cache_modes():
|
||||||
error_msg = _("Invalid cache mode")
|
error_msg = _("Invalid cache mode")
|
||||||
error_messages.append(error_msg)
|
error_messages.append(error_msg)
|
||||||
|
|
||||||
if 'UEFI' in data["firmware"]:
|
if 'UEFI' in data["firmware"]:
|
||||||
firmware["loader"] = data["firmware"].split(":")[1].strip()
|
firmware["loader"] = data["firmware"].split(":")[1].strip()
|
||||||
firmware["secure"] = 'no'
|
firmware["secure"] = 'no'
|
||||||
|
|
|
@ -209,7 +209,7 @@ class wvmCreate(wvmConnect):
|
||||||
xml += """<apic/>"""
|
xml += """<apic/>"""
|
||||||
if 'pae' in caps["features"]:
|
if 'pae' in caps["features"]:
|
||||||
xml += """<pae/>"""
|
xml += """<pae/>"""
|
||||||
if 'yes' == firmware["secure"]:
|
if 'yes' == firmware.get("secure", 'no'):
|
||||||
xml += """<smm state="on"/>"""
|
xml += """<smm state="on"/>"""
|
||||||
xml += """</features>"""
|
xml += """</features>"""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue