mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +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(): | ||||
|                             error_msg = _("Invalid cache mode") | ||||
|                             error_messages.append(error_msg) | ||||
| 
 | ||||
|                         if 'UEFI' in data["firmware"]: | ||||
|                             firmware["loader"] = data["firmware"].split(":")[1].strip() | ||||
|                             firmware["secure"] = 'no' | ||||
|  |  | |||
|  | @ -209,7 +209,7 @@ class wvmCreate(wvmConnect): | |||
|                 xml += """<apic/>""" | ||||
|             if 'pae' in caps["features"]: | ||||
|                 xml += """<pae/>""" | ||||
|             if 'yes' == firmware["secure"]: | ||||
|             if 'yes' == firmware.get("secure", 'no'): | ||||
|                 xml += """<smm state="on"/>""" | ||||
|             xml += """</features>""" | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue