mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Support for "usage" for "Cloud" nodes. Fixes https://github.com/GNS3/gns3-gui/issues/2887
Allow "usage" for all builtin nodes (not exposed in Ui).
This commit is contained in:
1 parent
d11897c1ec
commit
dff035d957
26 files changed
+100
-35
No files matched your search
@@ -51,6 +51,7 @@ async def test_json_with_ports(on_gns3vm, compute_project, manager):
|
||||
cloud = Cloud("cloud1", str(uuid.uuid4()), compute_project, manager, ports=ports)
|
||||
assert cloud.__json__() == {
|
||||
"name": "cloud1",
|
||||
"usage": "",
|
||||
"node_id": cloud.id,
|
||||
"project_id": compute_project.id,
|
||||
"remote_console_host": "",
|
||||
@@ -83,6 +84,7 @@ def test_json_without_ports(on_gns3vm, compute_project, manager):
|
||||
cloud = Cloud("cloud1", str(uuid.uuid4()), compute_project, manager, ports=None)
|
||||
assert cloud.__json__() == {
|
||||
"name": "cloud1",
|
||||
"usage": "",
|
||||
"node_id": cloud.id,
|
||||
"project_id": compute_project.id,
|
||||
"remote_console_host": "",
|
||||
|
||||
@@ -26,6 +26,7 @@ def test_json_gns3vm(on_gns3vm, compute_project):
|
||||
nat = Nat("nat1", str(uuid.uuid4()), compute_project, MagicMock())
|
||||
assert nat.__json__() == {
|
||||
"name": "nat1",
|
||||
"usage": "",
|
||||
"node_id": nat.id,
|
||||
"project_id": compute_project.id,
|
||||
"status": "started",
|
||||
@@ -48,6 +49,7 @@ def test_json_darwin(darwin_platform, compute_project):
|
||||
nat = Nat("nat1", str(uuid.uuid4()), compute_project, MagicMock())
|
||||
assert nat.__json__() == {
|
||||
"name": "nat1",
|
||||
"usage": "",
|
||||
"node_id": nat.id,
|
||||
"project_id": compute_project.id,
|
||||
"status": "started",
|
||||
@@ -68,6 +70,7 @@ def test_json_windows_with_full_name_of_interface(windows_platform, project):
|
||||
nat = Nat("nat1", str(uuid.uuid4()), project, MagicMock())
|
||||
assert nat.__json__() == {
|
||||
"name": "nat1",
|
||||
"usage": "",
|
||||
"node_id": nat.id,
|
||||
"project_id": project.id,
|
||||
"status": "started",
|
||||
|
||||
Reference in new issue
Block a user