mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix If cloud interface is down the project doesn't open
Fix https://github.com/GNS3/gns3-gui/issues/1751
This commit is contained in:
4 files changed
+33
-15
No files matched your search
@@ -43,7 +43,7 @@ def test_json_with_ports(on_gns3vm, project):
|
||||
"name": "cloud1",
|
||||
"node_id": cloud.id,
|
||||
"project_id": project.id,
|
||||
"status": "started",
|
||||
"status": "stopped",
|
||||
"ports_mapping": [
|
||||
{
|
||||
"interface": "virbr0",
|
||||
@@ -69,7 +69,7 @@ def test_json_without_ports(on_gns3vm, project):
|
||||
"name": "cloud1",
|
||||
"node_id": cloud.id,
|
||||
"project_id": project.id,
|
||||
"status": "started",
|
||||
"status": "stopped",
|
||||
"ports_mapping": [
|
||||
{
|
||||
"interface": "eth0",
|
||||
@@ -141,6 +141,7 @@ def test_linux_ethernet_raw_add_nio(linux_platform, project, async_run, nio):
|
||||
}
|
||||
]
|
||||
cloud = Cloud("cloud1", str(uuid.uuid4()), project, MagicMock(), ports=ports)
|
||||
cloud.status = "started"
|
||||
|
||||
with asyncio_patch("gns3server.compute.builtin.nodes.cloud.Cloud._ubridge_send") as ubridge_mock:
|
||||
with patch("gns3server.compute.builtin.nodes.cloud.Cloud._interfaces", return_value=[{"name": "eth0"}]):
|
||||
@@ -167,6 +168,7 @@ def test_linux_ethernet_raw_add_nio_bridge(linux_platform, project, async_run, n
|
||||
}
|
||||
]
|
||||
cloud = Cloud("cloud1", str(uuid.uuid4()), project, MagicMock(), ports=ports)
|
||||
cloud.status = "started"
|
||||
|
||||
with asyncio_patch("gns3server.compute.builtin.nodes.cloud.Cloud._ubridge_send") as ubridge_mock:
|
||||
with patch("gns3server.compute.builtin.nodes.cloud.Cloud._interfaces", return_value=[{"name": "bridge0"}]):
|
||||
|
||||
@@ -54,7 +54,7 @@ def test_cloud_get(http_compute, project, vm):
|
||||
assert response.route == "/projects/{project_id}/cloud/nodes/{node_id}"
|
||||
assert response.json["name"] == "Cloud 1"
|
||||
assert response.json["project_id"] == project.id
|
||||
assert response.json["status"] == "started"
|
||||
assert response.json["status"] == "stopped"
|
||||
|
||||
|
||||
def test_cloud_nio_create_udp(http_compute, vm):
|
||||
|
||||
Reference in new issue
Block a user