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:
grossmj committed 2020-07-15 19:15:51 +09:30
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": "",
+3
View File
@@ -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",