mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge branch '2.0' into 2.1
This commit is contained in:
19 files changed
+218
-21
No files matched your search
@@ -840,7 +840,7 @@ def test_get_image_informations(project, manager, loop):
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
|
||||
def test_mount_binds(vm, tmpdir):
|
||||
image_infos = {
|
||||
"ContainerConfig": {
|
||||
"Config": {
|
||||
"Volumes": {
|
||||
"/test/experimental": {}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ def test_import_project(async_run, tmpdir, controller):
|
||||
topology = {
|
||||
"project_id": str(uuid.uuid4()),
|
||||
"name": "test",
|
||||
"auto_open": True,
|
||||
"auto_start": True,
|
||||
"topology": {
|
||||
},
|
||||
"version": "2.0.0"
|
||||
@@ -67,6 +69,8 @@ def test_import_project(async_run, tmpdir, controller):
|
||||
# A new project name is generated when you import twice the same name
|
||||
with open(zip_path, "rb") as f:
|
||||
project = async_run(import_project(controller, str(uuid.uuid4()), f))
|
||||
assert project.auto_open is False
|
||||
assert project.auto_start is False
|
||||
assert project.name != "test"
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"auto_start": false,
|
||||
"name": "1_3_dynamips",
|
||||
"project_id": "ba5790e1-2f51-443e-a3cc-1a2eee132888",
|
||||
"revision": 6,
|
||||
"topology": {
|
||||
"computes": [
|
||||
{
|
||||
"compute_id": "local",
|
||||
"host": "127.0.0.1",
|
||||
"name": "Local",
|
||||
"port": 8000,
|
||||
"protocol": "http"
|
||||
}
|
||||
],
|
||||
"drawings": [],
|
||||
"links": [],
|
||||
"nodes": [
|
||||
{
|
||||
"symbol": ":/symbols/iosv_virl.svg",
|
||||
"compute_id": "local",
|
||||
"console": 2001,
|
||||
"console_type": "telnet",
|
||||
"label": {
|
||||
"rotation": 0,
|
||||
"style": "font-family: TypeWriter;font-size: 10;font-weight: bold;fill: #000000;fill-opacity: 1.0;",
|
||||
"text": "R1",
|
||||
"x": 22,
|
||||
"y": -25
|
||||
},
|
||||
"name": "R1",
|
||||
"node_id": "0bce6ad5-c688-4d4d-a425-f21aaf3927e2",
|
||||
"node_type": "dynamips",
|
||||
"port_name_format": "Ethernet{0}",
|
||||
"port_segment_size": 0,
|
||||
"first_port_name": null,
|
||||
"properties": {
|
||||
"dynamips_id": 1,
|
||||
"auto_delete_disks": true,
|
||||
"clock_divisor": 4,
|
||||
"disk0": 0,
|
||||
"disk1": 0,
|
||||
"exec_area": 64,
|
||||
"idlemax": 500,
|
||||
"idlesleep": 30,
|
||||
"image": "c7200-adventerprisek9-mz.124-24.T8.image",
|
||||
"mac_addr": "ca01.2f39.0000",
|
||||
"midplane": "vxr",
|
||||
"mmap": true,
|
||||
"npe": "npe-400",
|
||||
"nvram": 512,
|
||||
"platform": "c7200",
|
||||
"power_supplies": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"ram": 512,
|
||||
"sensors": [
|
||||
22,
|
||||
22,
|
||||
22,
|
||||
22
|
||||
],
|
||||
"slot0": "C7200-IO-FE",
|
||||
"sparsemem": true,
|
||||
"startup_config": "configs/i1_startup-config.cfg",
|
||||
"system_id": "FTX0945W0MY"
|
||||
},
|
||||
"x": -112,
|
||||
"y": -100,
|
||||
"z": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "topology",
|
||||
"version": "ANYSTR"
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"auto_start": false,
|
||||
"name": "1_3_dynamips",
|
||||
"project_id": "ba5790e1-2f51-443e-a3cc-1a2eee132888",
|
||||
"revision": 3,
|
||||
"topology": {
|
||||
"nodes": [
|
||||
{
|
||||
"default_symbol": ":/symbols/iosv_virl.normal.svg",
|
||||
"description": "Router c7200",
|
||||
"dynamips_id": 1,
|
||||
"hover_symbol": ":/symbols/iosv_virl.selected.svg",
|
||||
"id": 1,
|
||||
"label": {
|
||||
"color": "#000000",
|
||||
"font": "TypeWriter,10,-1,5,75,0,0,0,0,0",
|
||||
"text": "R1",
|
||||
"x": 22.6171875,
|
||||
"y": -25.0
|
||||
},
|
||||
"ports": [
|
||||
{
|
||||
"adapter_number": 0,
|
||||
"id": 1,
|
||||
"name": "FastEthernet0/0",
|
||||
"port_number": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"auto_delete_disks": true,
|
||||
"clock_divisor": 4,
|
||||
"console": 2001,
|
||||
"disk0": 0,
|
||||
"disk1": 0,
|
||||
"exec_area": 64,
|
||||
"idlemax": 500,
|
||||
"idlesleep": 30,
|
||||
"image": "c7200-adventerprisek9-mz.124-24.T8.image",
|
||||
"mac_addr": "ca01.2f39.0000",
|
||||
"midplane": "vxr",
|
||||
"mmap": true,
|
||||
"name": "R1",
|
||||
"npe": "npe-400",
|
||||
"nvram": 512,
|
||||
"platform": "c7200",
|
||||
"power_supplies": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"ram": 512,
|
||||
"sensors": [
|
||||
22,
|
||||
22,
|
||||
22,
|
||||
22
|
||||
],
|
||||
"slot0": "C7200-IO-FE",
|
||||
"sparsemem": true,
|
||||
"startup_config": "configs/i1_startup-config.cfg",
|
||||
"system_id": "FTX0945W0MY"
|
||||
},
|
||||
"server_id": 1,
|
||||
"vm_id": "0bce6ad5-c688-4d4d-a425-f21aaf3927e2",
|
||||
"x": -112.0,
|
||||
"y": -100.0
|
||||
}
|
||||
],
|
||||
"servers": [
|
||||
{
|
||||
"cloud": false,
|
||||
"host": "127.0.0.1",
|
||||
"id": 1,
|
||||
"local": true,
|
||||
"port": 8000
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "topology",
|
||||
"version": "1.3.13"
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import io
|
||||
import types
|
||||
import asyncio
|
||||
import unittest.mock
|
||||
|
||||
@@ -69,6 +70,10 @@ class AsyncioMagicMock(unittest.mock.MagicMock):
|
||||
"""
|
||||
Magic mock returning coroutine
|
||||
"""
|
||||
try:
|
||||
__class__ = types.CoroutineType
|
||||
except AttributeError: # Not supported with Python 3.4
|
||||
__class__ = types.GeneratorType
|
||||
|
||||
def __init__(self, return_value=None, return_values=None, **kwargs):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user