Support for 1.3 topologies

This commit is contained in:
Julien Duponchelle committed 2016-07-13 18:31:12 +02:00
1 parent c0abe0edfd
commit 45591aa74b
4 files changed
+173 -3

No files matched your search

+4 -1
View File
@@ -106,6 +106,9 @@ def compare_dict(path, source, reference):
elif isinstance(val, list):
assert len(val) == len(source[key]), "Not enough value in {} ({}/{}) it shoud be {} not {}".format(key, len(val), len(source[key]), val, source[key])
for idx, element in enumerate(source[key]):
compare_dict(path + key + "/", element, val[idx])
if isinstance(element, dict):
compare_dict(path + key + "/", element, val[idx])
else:
assert element == val[idx]
else:
assert False, "Value type for {} is not supported".format(key)
@@ -0,0 +1,74 @@
{
"auto_start": false,
"name": "1_3_dynamips",
"project_id": "ba5790e1-2f51-443e-a3cc-1a2eee132888",
"revision": 5,
"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",
"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": "2.0.0dev1"
}
@@ -0,0 +1,81 @@
{
"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,
"type": "C7200",
"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"
}