Add allow_unsafe_options for Qemu settings

This commit is contained in:
grossmj 2024-07-07 19:08:12 +02:00
parent 6ed18c561f
commit 6b14abc06f
No known key found for this signature in database
GPG Key ID: 0A2D76AC45EA25CD
2 changed files with 3 additions and 0 deletions

View File

@ -320,6 +320,7 @@ async def export_project(
include_snapshots: bool = False, include_snapshots: bool = False,
include_images: bool = False, include_images: bool = False,
reset_mac_addresses: bool = False, reset_mac_addresses: bool = False,
keep_compute_ids: bool = False,
compression: schemas.ProjectCompression = "zstd", compression: schemas.ProjectCompression = "zstd",
compression_level: int = None, compression_level: int = None,
) -> StreamingResponse: ) -> StreamingResponse:
@ -366,6 +367,7 @@ async def export_project(
tmpdir, tmpdir,
include_snapshots=include_snapshots, include_snapshots=include_snapshots,
include_images=include_images, include_images=include_images,
keep_compute_ids=keep_compute_ids,
reset_mac_addresses=reset_mac_addresses, reset_mac_addresses=reset_mac_addresses,
) )
async for chunk in zstream: async for chunk in zstream:

View File

@ -69,6 +69,7 @@ class QemuSettings(BaseModel):
monitor_host: str = "127.0.0.1" monitor_host: str = "127.0.0.1"
enable_hardware_acceleration: bool = True enable_hardware_acceleration: bool = True
require_hardware_acceleration: bool = False require_hardware_acceleration: bool = False
allow_unsafe_options: bool = False
model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True) model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)