mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-23 22:34:35 +02:00
feat(qemu): support SATA CD-ROM interfaces
- Add per-drive IDE/SATA selection with backward-compatible IDE defaults - Persist interfaces in nodes, templates, and appliance imports - Add database migration support for versioned and unversioned databases - Prevent partial updates when rejecting live interface changes - Validate interfaces and support SATA media changes through the monitor
This commit is contained in:
1 parent
84b4c05b9f
commit
58e5591935
13 files changed
+351
-26
No files matched your search
@@ -1112,6 +1112,28 @@ class TestDockerTemplate:
|
||||
|
||||
|
||||
class TestQemuTemplate:
|
||||
async def test_cdrom_interfaces_persist_on_template_update(self, app, client):
|
||||
params = {
|
||||
"name": "SATA installer",
|
||||
"compute_id": "local",
|
||||
"template_type": "qemu",
|
||||
"cdrom_interface": "sata",
|
||||
"cdrom2_interface": "sata",
|
||||
}
|
||||
response = await client.post(app.url_path_for("create_template"), json=params)
|
||||
assert response.status_code == status.HTTP_201_CREATED
|
||||
template_id = response.json()["template_id"]
|
||||
url = app.url_path_for("get_template", template_id=template_id)
|
||||
saved = (await client.get(url)).json()
|
||||
assert saved["cdrom_interface"] == saved["cdrom2_interface"] == "sata"
|
||||
response = await client.put(
|
||||
app.url_path_for("update_template", template_id=template_id), json={"cdrom_interface": "ide"}
|
||||
)
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
saved = (await client.get(url)).json()
|
||||
assert saved["cdrom_interface"] == "ide"
|
||||
assert saved["cdrom2_interface"] == "sata"
|
||||
|
||||
async def test_qemu_template_create(self, app: FastAPI, client: AsyncClient) -> None:
|
||||
|
||||
params = {
|
||||
|
||||
Reference in new issue
Block a user