Move the generation of the list of ports to the server

Ref #676
This commit is contained in:
Julien Duponchelle committed 2016-09-14 15:21:37 +02:00
1 parent f06c00fdb8
commit 2f0e2260ab
50 files changed
+1347 -240

No files matched your search

+18 -2
View File
@@ -101,7 +101,20 @@ def test_json(node, compute):
"width": node.width,
"height": node.height,
"symbol": node.symbol,
"label": node.label
"label": node.label,
"port_name_format": "Ethernet{0}",
"port_segment_size": 0,
"first_port_name": None,
"ports": [
{
"adapter_number": 0,
"data_link_types": {"Ethernet": "DLT_EN10MB"},
"link_type": "ethernet",
"name": "Ethernet0",
"port_number": 0,
"short_name": "e0/0"
}
]
}
assert node.__json__(topology_dump=True) == {
"compute_id": str(compute.id),
@@ -117,7 +130,10 @@ def test_json(node, compute):
"width": node.width,
"height": node.height,
"symbol": node.symbol,
"label": node.label
"label": node.label,
"port_name_format": "Ethernet{0}",
"port_segment_size": 0,
"first_port_name": None
}