diff --git a/pyproject.toml b/pyproject.toml index de446d86..90b0b419 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [tool.black] -src_paths = ["setup.py", "swagger_server", "bapm_server", "tests"] +src_paths = ["setup.py", "swagger_server", "bapm_server"] [tool.isort] profile = "black" -src_paths = ["setup.py", "swagger_server", "bapm_server", "tests"] +src_paths = ["setup.py", "swagger_server", "bapm_server"] [tool.coverage.run] branch = true -omit = [ "tests/*", "swagger_server/test/*" ] +omit = [ "swagger_server/test/*" ] relative_files = true # The section below will let us have relative paths in test coverage @@ -22,3 +22,4 @@ source = [ # In tox environments. ".tox/**/site-packages/", ] + diff --git a/samples/connection-requests/amlight-to-amlight.json b/samples/connection-requests/amlight-to-amlight.json deleted file mode 100644 index 58ac23cf..00000000 --- a/samples/connection-requests/amlight-to-amlight.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "08195fd2-25f7-433a-bf94-0b4a7416189a", - "name": "amlight-b2-to-amlight-a1", - "note": "does not work -- no optimal solution", - "start_time": "2000-01-23T04:56:07.000Z", - "end_time": "2000-01-23T04:56:07.000Z", - "bandwidth_required": 10, - "latency_required": 300, - "ingress_port": - { - "id": "urn:sdx:port:amlight.net:B2:2", - "name": "Novi01:2", - "node": "urn:sdx:node:amlight.net:B2", - "status": "up" - }, - "egress_port": - { - "id": "urn:sdx:port:amlight.net:A1:1", - "name": "Novi100:1", - "node": "urn:sdx:node:amlight.net:A1", - "status": "up" - } -} diff --git a/samples/connection-requests/sax-to-amlight-1.json b/samples/connection-requests/sax-to-amlight-1.json deleted file mode 100644 index 7480a698..00000000 --- a/samples/connection-requests/sax-to-amlight-1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "f886c0f8-d44a-4c40-b768-e1fb3eeb7353", - "name": "sax-a1-to-amlight-b1", - "start_time": "2000-01-23T04:56:07.000Z", - "end_time": "2000-01-23T04:56:07.000Z", - "bandwidth_required": 10, - "latency_required": 300, - "egress_port": - { - "id": "urn:ogf:network:sdx:port:sax:A1:1", - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:sax:A1", - "status": "up" - }, - "ingress_port": - { - "id": "urn:sdx:port:amlight.net:A1:1", - "name": "Novi100:1", - "node": "urn:sdx:node:amlight.net:A1", - "status": "up" - } -} diff --git a/samples/connection-requests/sax-to-sax.json b/samples/connection-requests/sax-to-sax.json deleted file mode 100644 index 6f396720..00000000 --- a/samples/connection-requests/sax-to-sax.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "a6228238-3d47-4bf7-af56-141ec6e899f8", - "name": "sax-a1-to-sax-b1", - "start_time": "2000-01-23T04:56:07.000Z", - "end_time": "2000-01-23T04:56:07.000Z", - "bandwidth_required": 10, - "latency_required": 300, - "egress_port": - { - "id": "urn:ogf:network:sdx:port:sax:A1:1", - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:sax:A1", - "status": "up" - }, - "ingress_port": - { - "id": "urn:ogf:network:sdx:port:sax:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:node:sax:B1", - "status": "up" - } -} diff --git a/samples/topologies/amlight.json b/samples/topologies/amlight.json deleted file mode 100644 index 5ebebfc5..00000000 --- a/samples/topologies/amlight.json +++ /dev/null @@ -1,310 +0,0 @@ -{ - "id": "urn:ogf:network:sdx:topology:amlight.net", - "name": "AmLight-OXP", - "model_version":"1.0.0", - "time_stamp": "2000-01-23T04:56:07+00:00", - "version": 1, - "links": [ - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:amlight:B1-B2", - "latency": 146582.15146899645, - "name": "amlight:B1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B1:2", - "name": "Novi01:2", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:2", - "status": "up" - } - ], - "short_name": "Miami-BocaRaton", - "bandwidth": 80083.7389632821 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:amlight:A1-B1", - "latency": 146582.15146899645, - "name": "amlight:A1-B1", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:sdx:port:amlight.net:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B1:3", - "name": "Novi01:3", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "redclara-miami", - "bandwidth": 80083.7389632821 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:amlight:A1-B2", - "latency": 146582.15146899645, - "name": "amlight:A1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:sdx:port:amlight.net:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:2", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "redclara-BocaRaton", - "bandwidth": 80083.7389632821 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:nni:Miami-Sanpaolo", - "latency": 146582.15146899645, - "name": "nni:Miami-Sanpaolo", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:sdx:port:amlight:B1:1", - "name": "Novi01:1", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Miami-Sanpaolo", - "bandwidth": 80083.7389632821 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:nni:BocaRaton-Fortaleza", - "latency": 146582.15146899645, - "name": "nni:BocaRaton-Fortaleza", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:1", - "status": "up" - } - ], - "short_name": "BocaRaton-Fortaleza", - "bandwidth": 80083.7389632821 - } - ], - "nodes": [ - { - "id": "urn:sdx:node:amlight.net:B1", - "location": { - "address": "Miami", - "latitude": 25.75633040531146, - "longitude": -80.37676058477908 - }, - "name": "amlight:Novi01", - "ports": [ - { - "id": "urn:sdx:port:amlight:B1:1", - "name": "Novi01:1", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B1:2", - "name": "Novi01:2", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B1:3", - "name": "Novi01:3", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "B1" - }, - { - "id": "urn:sdx:node:amlight.net:B2", - "location": { - "address": "BocaRaton", - "latitude": 26.381437356374075, - "longitude": -80.10225977485742 - }, - "name": "amlight:Novi02", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:2", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "B2" - }, - { - "id": "urn:sdx:node:amlight.net:A1", - "location": { - "address": "redclara", - "latitude": 30.34943181039702, - "longitude": -81.66666016473143 - }, - "name": "amlight:Novi100", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:2", - "status": "up" - } - ], - "short_name": "A1" - } - ], - "domain_service": { - "owner":"FIU" - } - } \ No newline at end of file diff --git a/samples/topologies/sax.json b/samples/topologies/sax.json deleted file mode 100644 index 4621b210..00000000 --- a/samples/topologies/sax.json +++ /dev/null @@ -1,480 +0,0 @@ -{ - "id": "urn:ogf:network:sdx:topology:sax.net", - "name": "SAX-OXP", - "time_stamp": "2000-01-23T04:56:07+00:00", - "version": 1, - "model_version":"1.0.0", - "links": [ - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:B1-B2", - "latency": 5, - "name": "sax:B1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:node:sax:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:2", - "status": "up" - } - ], - "short_name": "SaoPaulo-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:Panama-Fortaleza", - "latency": 5, - "name": "sax:Panama-Fortaleza", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:4", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:4", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "Panama-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:SanPaolo-Fortaleza", - "latency": 5, - "name": "nni:SanPaolo-Fortaleza", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi03:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:3", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:4", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:node:sax:B1", - "short_name": "B1:4", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "BocaRaton-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:A1-B1", - "latency": 5, - "name": "sax:A1-B1", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:node:sax:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "redclara-SaoPaulo", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:A1-B2", - "latency": 5, - "name": "sax:A1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "redclara-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:nni:Miami-Sanpaolo", - "latency": 10, - "name": "nni:Miami-Sanpaolo", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:sdx:port:amlight:B1:1", - "name": "Novi01:1", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:node:sax:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Miami-Sanpaolo", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:nni:BocaRaton-Fortaleza", - "latency": 10, - "name": "nni:BocaRaton-Fortaleza", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:1", - "status": "up" - } - ], - "short_name": "BocaRaton-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:nni:Fortaleza-Sangano", - "latency": 5, - "name": "nni:Fortaleza-Sangano", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Fortaleza-Sangano", - "bandwidth": 100000 - } - ], - "nodes": [ - { - "id": "urn:ogf:network:sdx:node:sax:B1", - "location": { - "address": "SaoPaulo", - "latitude": -23.5311561958366, - "longitude": -46.650271781410524 - }, - "name": "sax:Novi01", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:4", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:4", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "B1" - }, - { - "id": "urn:ogf:network:sdx:node:sax:B2", - "location": { - "address": "PanamaCity", - "latitude": 8.993040465928525, - "longitude": -79.4947050137491 - }, - "name": "sax:Novi02", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:4", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:4", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "B2" - }, - { - "id": "urn:ogf:network:sdx:node:sax:B3", - - "location": { - "address": "Fortaleza", - "latitude": -3.73163824920348, - "longitude": -38.52443289673026 - }, - "name": "sax:Novi03", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B3:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B3:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi03:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:3", - "status": "up" - } - ], - "short_name": "B3" - }, - { - "id": "urn:ogf:network:sdx:node:sax:A1", - "location": { - "address": "Santiago", - "latitude": -33.4507049233331, - "longitude": -70.64634765264213 - }, - "name": "sax:Novi100", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:2", - "status": "up" - } - ], - "short_name": "A1" - } - ], - "domain_service": { - "owner":"RNP" - } - } \ No newline at end of file diff --git a/samples/topologies/zaoxi.json b/samples/topologies/zaoxi.json deleted file mode 100644 index 9c855c04..00000000 --- a/samples/topologies/zaoxi.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "id": "urn:ogf:network:sdx:topology:zaoxi.net", - "name": "ZAOXI-OXP", - "time_stamp": "2000-01-23T04:56:07+00:00", - "version": 1, - "model_version":"1.0.0", - "links": [ - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:zaoxi:B1-B2", - "latency": 5, - "name": "zaoxi:B1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:2", - "status": "up" - } - ], - "short_name": "Sangano-Capetown", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:zaoxi:A1-B1", - "latency": 5, - "name": "zaoxi:A1-B1", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Karoo-Sangano", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:zaoxi:A1-B2", - "latency": 5, - "name": "zaoxi:A1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "Karoo-Capetown", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:nni:Fortaleza-Sangano", - "latency": 10, - "name": "nni:Fortaleza-Sangano", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Fortaleza-Sangano", - "bandwidth": 100000 - } - ], - "nodes": [ - { - "id": "urn:ogf:network:sdx:node:zaoxi:B1", - "location": { - "address": "Sangano", - "latitude": -9.533459658700743, - "longitude": 13.216709879405311 - }, - "name": "zaoxi:Novi01", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "B1" - }, - { - "id": "urn:ogf:network:sdx:node:zaoxi:B2", - "location": { - "address": "CapeTown", - "latitude": -3.73163824920348, - "longitude": -38.52443289673026 - }, - "name": "zaoxi:Novi02", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "B2" - }, - { - "id": "urn:ogf:network:sdx:node:zaoxi:A1", - "location": { - "address": "Karoo", - "latitude": -32.3632301851245, - "longitude": 22.541224555821298 - }, - "name": "zaoxi:Novi100", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:2", - "status": "up" - } - ], - "short_name": "A1" - } - ] - } \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index 9a1b2ae6..00000000 --- a/tests/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -import glob -from os.path import basename, dirname, isfile, join - -modules = glob.glob(join(dirname(__file__), "*.py")) -__all__ = [ - basename(f)[:-3] for f in modules if isfile(f) and not f.endswith("__init__.py") -] diff --git a/tests/data/LB_data.json b/tests/data/LB_data.json deleted file mode 100644 index ad217f4a..00000000 --- a/tests/data/LB_data.json +++ /dev/null @@ -1,1248 +0,0 @@ -{ - "constraint_coeffs": [ - [ - -1, - -1, - -1, - 1, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 1, - 0, - 0, - -1, - -1, - -1, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 1, - 0, - 0, - 1, - 0, - -1, - -1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - -1, - -1, - -1, - 1, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - -1, - -1, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 1, - -1, - -1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - -1, - -1, - -1, - -1, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 1, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - -1, - -1, - -1, - -1, - 0, - 0, - 1, - 0, - 1 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - -1, - -1, - -1, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - -1, - -1 - ], - [ - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10, - 0 - ], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 10 - ], - [ - 8, - 10, - 9, - 8, - 6, - 7, - 10, - 6, - 8, - 5, - 6, - 8, - 7, - 5, - 7, - 9, - 7, - 8, - 1, - 7, - 7, - 4, - 7, - 6, - 8, - 4, - 1, - 7 - ] - ], - "bounds": [ - 0, - 0, - 1, - 0, - 0, - -1, - 0, - 0, - 0, - 0, - 80083.7389632821, - 80083.7389632821, - 100000, - 80083.7389632821, - 80083.7389632821, - 100000, - 80083.7389632821, - 80083.7389632821, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 300 - ], - "obj_coeffs": [ - 9694219, - 10403672, - 2039769, - 9694219, - 13836762, - 411214, - 10403672, - 13836762, - 10354894, - 1274971, - 1329606, - 10354894, - 9673675, - 1274971, - 9673675, - 2039769, - 2240710, - 8906672, - 5628619, - 411214, - 2240710, - 1722931, - 16209298, - 1329606, - 8906672, - 1722931, - 5628619, - 16209298 - ], - "num_vars": 28, - "num_constraints": 39, - "num_inequality": 29 -} \ No newline at end of file diff --git a/tests/data/LB_linklist.json b/tests/data/LB_linklist.json deleted file mode 100644 index e238289d..00000000 --- a/tests/data/LB_linklist.json +++ /dev/null @@ -1,114 +0,0 @@ -[ - [ - 0, - 1 - ], - [ - 0, - 2 - ], - [ - 0, - 6 - ], - [ - 1, - 0 - ], - [ - 1, - 2 - ], - [ - 1, - 7 - ], - [ - 2, - 0 - ], - [ - 2, - 1 - ], - [ - 3, - 4 - ], - [ - 3, - 5 - ], - [ - 3, - 8 - ], - [ - 4, - 3 - ], - [ - 4, - 5 - ], - [ - 5, - 3 - ], - [ - 5, - 4 - ], - [ - 6, - 0 - ], - [ - 6, - 7 - ], - [ - 6, - 8 - ], - [ - 6, - 9 - ], - [ - 7, - 1 - ], - [ - 7, - 6 - ], - [ - 7, - 8 - ], - [ - 7, - 9 - ], - [ - 8, - 3 - ], - [ - 8, - 6 - ], - [ - 8, - 7 - ], - [ - 9, - 6 - ], - [ - 9, - 7 - ] -] \ No newline at end of file diff --git a/tests/data/amlight.json b/tests/data/amlight.json deleted file mode 100644 index 5ebebfc5..00000000 --- a/tests/data/amlight.json +++ /dev/null @@ -1,310 +0,0 @@ -{ - "id": "urn:ogf:network:sdx:topology:amlight.net", - "name": "AmLight-OXP", - "model_version":"1.0.0", - "time_stamp": "2000-01-23T04:56:07+00:00", - "version": 1, - "links": [ - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:amlight:B1-B2", - "latency": 146582.15146899645, - "name": "amlight:B1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B1:2", - "name": "Novi01:2", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:2", - "status": "up" - } - ], - "short_name": "Miami-BocaRaton", - "bandwidth": 80083.7389632821 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:amlight:A1-B1", - "latency": 146582.15146899645, - "name": "amlight:A1-B1", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:sdx:port:amlight.net:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B1:3", - "name": "Novi01:3", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "redclara-miami", - "bandwidth": 80083.7389632821 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:amlight:A1-B2", - "latency": 146582.15146899645, - "name": "amlight:A1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:sdx:port:amlight.net:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:2", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "redclara-BocaRaton", - "bandwidth": 80083.7389632821 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:nni:Miami-Sanpaolo", - "latency": 146582.15146899645, - "name": "nni:Miami-Sanpaolo", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:sdx:port:amlight:B1:1", - "name": "Novi01:1", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Miami-Sanpaolo", - "bandwidth": 80083.7389632821 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 602746.015561422, - "id": "urn:ogf:network:sdx:link:nni:BocaRaton-Fortaleza", - "latency": 146582.15146899645, - "name": "nni:BocaRaton-Fortaleza", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:1", - "status": "up" - } - ], - "short_name": "BocaRaton-Fortaleza", - "bandwidth": 80083.7389632821 - } - ], - "nodes": [ - { - "id": "urn:sdx:node:amlight.net:B1", - "location": { - "address": "Miami", - "latitude": 25.75633040531146, - "longitude": -80.37676058477908 - }, - "name": "amlight:Novi01", - "ports": [ - { - "id": "urn:sdx:port:amlight:B1:1", - "name": "Novi01:1", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B1:2", - "name": "Novi01:2", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B1:3", - "name": "Novi01:3", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "B1" - }, - { - "id": "urn:sdx:node:amlight.net:B2", - "location": { - "address": "BocaRaton", - "latitude": 26.381437356374075, - "longitude": -80.10225977485742 - }, - "name": "amlight:Novi02", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:2", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "B2" - }, - { - "id": "urn:sdx:node:amlight.net:A1", - "location": { - "address": "redclara", - "latitude": 30.34943181039702, - "longitude": -81.66666016473143 - }, - "name": "amlight:Novi100", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:2", - "status": "up" - } - ], - "short_name": "A1" - } - ], - "domain_service": { - "owner":"FIU" - } - } \ No newline at end of file diff --git a/tests/data/bwlinklist.json b/tests/data/bwlinklist.json deleted file mode 100644 index a8d5a141..00000000 --- a/tests/data/bwlinklist.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - 80083.7389632821, - 80083.7389632821, - 100000, - 80083.7389632821, - 80083.7389632821, - 100000, - 80083.7389632821, - 80083.7389632821, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000, - 100000 -] \ No newline at end of file diff --git a/tests/data/latconstraint.json b/tests/data/latconstraint.json deleted file mode 100644 index 29c7d702..00000000 --- a/tests/data/latconstraint.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "lhs": [ - [ - 8, - 10, - 9, - 8, - 6, - 7, - 10, - 6, - 8, - 5, - 6, - 8, - 7, - 5, - 7, - 9, - 7, - 8, - 1, - 7, - 7, - 4, - 7, - 6, - 8, - 4, - 1, - 7 - ] - ], - "rhs": [ - 300 - ] -} \ No newline at end of file diff --git a/tests/data/latency_list.json b/tests/data/latency_list.json deleted file mode 100644 index eb43e43e..00000000 --- a/tests/data/latency_list.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - 8, - 10, - 9, - 8, - 6, - 7, - 10, - 6, - 8, - 5, - 6, - 8, - 7, - 5, - 7, - 9, - 7, - 8, - 1, - 7, - 7, - 4, - 7, - 6, - 8, - 4, - 1, - 7 -] \ No newline at end of file diff --git a/tests/data/p2p.json b/tests/data/p2p.json deleted file mode 100644 index 022910c0..00000000 --- a/tests/data/p2p.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id": "id", - "name": "AMLight", - "start_time": "2000-01-23T04:56:07.000Z", - "end_time": "2000-01-23T04:56:07.000Z", - "bandwidth_required": 100, - "latency_required": 20, - "egress_port": - { - "id": "urn:sdx:port:amlight.net:Novi07:10", - "name": "10", - "label": "vlan", - "label_range": "100", - "node": "urn:sdx:port:amlight.net:Novi07" - }, - "ingress_port": - { - "id": "urn:sdx:port:amlight.net:Novi06:9", - "name": "Novi06:9", - "label": "vlan", - "label_range": "100", - "node": "urn:sdx:port:amlight.net:Novi06" - } -} \ No newline at end of file diff --git a/tests/data/sax.json b/tests/data/sax.json deleted file mode 100644 index c6277277..00000000 --- a/tests/data/sax.json +++ /dev/null @@ -1,481 +0,0 @@ -{ - "id": "urn:ogf:network:sdx:topology:sax.net", - "name": "SAX-OXP", - "time_stamp": "2000-01-23T04:56:07+00:00", - "version": 1.0, - "model_version":"1.0.0", - "links": [ - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:B1-B2", - "latency": 5, - "name": "sax:B1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:node:sax:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:2", - "status": "up" - } - ], - "short_name": "SaoPaulo-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:Panama-Fortaleza", - "latency": 5, - "name": "sax:Panama-Fortaleza", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:4", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:4", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "Panama-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:SanPaolo-Fortaleza", - "latency": 5, - "name": "nni:SanPaolo-Fortaleza", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi03:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:3", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:4", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:node:sax:B1", - "short_name": "B1:4", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "BocaRaton-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:A1-B1", - "latency": 5, - "name": "sax:A1-B1", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:node:sax:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "redclara-SaoPaulo", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:sax:A1-B2", - "latency": 5, - "name": "sax:A1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "redclara-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:nni:Miami-Sanpaolo", - "nni": "True", - "latency": 10, - "name": "nni:Miami-Sanpaolo", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:sdx:port:amlight:B1:1", - "name": "Novi01:1", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:node:sax:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Miami-Sanpaolo", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:nni:BocaRaton-Fortaleza", - "latency": 10, - "name": "nni:BocaRaton-Fortaleza", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:1", - "status": "up" - } - ], - "short_name": "BocaRaton-Fortaleza", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:nni:Fortaleza-Sangano", - "latency": 5, - "name": "nni:Fortaleza-Sangano", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Fortaleza-Sangano", - "bandwidth": 100000 - } - ], - "nodes": [ - { - "id": "urn:ogf:network:sdx:node:sax:B1", - "location": { - "address": "SaoPaulo", - "latitude": -23.5311561958366, - "longitude": -46.650271781410524 - }, - "name": "sax:Novi01", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:4", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:4", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "B1" - }, - { - "id": "urn:ogf:network:sdx:node:sax:B2", - "location": { - "address": "PanamaCity", - "latitude": 8.993040465928525, - "longitude": -79.4947050137491 - }, - "name": "sax:Novi02", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:4", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:4", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "B2" - }, - { - "id": "urn:ogf:network:sdx:node:sax:B3", - - "location": { - "address": "Fortaleza", - "latitude": -3.73163824920348, - "longitude": -38.52443289673026 - }, - "name": "sax:Novi03", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B3:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B3:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi03:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:3", - "status": "up" - } - ], - "short_name": "B3" - }, - { - "id": "urn:ogf:network:sdx:node:sax:A1", - "location": { - "address": "Santiago", - "latitude": -33.4507049233331, - "longitude": -70.64634765264213 - }, - "name": "sax:Novi100", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:2", - "status": "up" - } - ], - "short_name": "A1" - } - ], - "domain_service": { - "owner":"RNP" - } -} \ No newline at end of file diff --git a/tests/data/sdx.json b/tests/data/sdx.json deleted file mode 100644 index 79b4ad49..00000000 --- a/tests/data/sdx.json +++ /dev/null @@ -1,1067 +0,0 @@ -{ - "id": "urn:ogf:network:sdx", - "name": "AmLight-OXP", - "domain_service": { - "monitoring_capability": null, - "owner": "FIU", - "private_attributes": null, - "provisioning_system": null, - "provisioning_url": null, - "vendor": null - }, - "version": "0.0", - "time_stamp": "2000-01-23T04:56:07+00:00", - "nodes": [ - { - "id": "urn:sdx:node:amlight.net:B1", - "name": "amlight:Novi01", - "short_name": "B1", - "location": { - "address": "Miami", - "latitude": -80.37676058477908, - "longitude": 25.75633040531146 - }, - "ports": [ - { - "id": "urn:sdx:port:amlight:B1:1", - "name": "Novi01:1", - "short_name": null, - "node": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:sdx:port:amlight.net:B1:2", - "name": "Novi01:2", - "short_name": null, - "node": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:sdx:port:amlight.net:B1:3", - "name": "Novi01:3", - "short_name": null, - "node": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - }, - { - "id": "urn:sdx:node:amlight.net:B2", - "name": "amlight:Novi02", - "short_name": "B2", - "location": { - "address": "BocaRaton", - "latitude": -80.10225977485742, - "longitude": 26.381437356374075 - }, - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B2:1", - "name": "Novi02:1", - "short_name": null, - "node": "B2:1", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:sdx:port:amlight.net:B2:2", - "name": "Novi02:2", - "short_name": null, - "node": "B2:2", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:sdx:port:amlight.net:B2:3", - "name": "Novi02:3", - "short_name": null, - "node": "B2:3", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - }, - { - "id": "urn:sdx:node:amlight.net:A1", - "name": "amlight:Novi100", - "short_name": "A1", - "location": { - "address": "redclara", - "latitude": -81.66666016473143, - "longitude": 30.34943181039702 - }, - "ports": [ - { - "id": "urn:sdx:port:amlight.net:A1:1", - "name": "Novi100:1", - "short_name": null, - "node": "A1:1", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:sdx:port:amlight.net:A1:2", - "name": "Novi100:2", - "short_name": null, - "node": "A1:2", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:node:sax:B1", - "name": "sax:Novi01", - "short_name": "B1", - "location": { - "address": "SaoPaulo", - "latitude": -46.650271781410524, - "longitude": -23.5311561958366 - }, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B1:1", - "name": "Novi01:1", - "short_name": null, - "node": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:2", - "name": "Novi01:2", - "short_name": null, - "node": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:3", - "name": "Novi01:3", - "short_name": null, - "node": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:4", - "name": "Novi01:3", - "short_name": null, - "node": "B1:4", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:node:sax:B2", - "name": "sax:Novi02", - "short_name": "B2", - "location": { - "address": "PanamaCity", - "latitude": -79.4947050137491, - "longitude": 8.993040465928525 - }, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B2:1", - "name": "Novi02:1", - "short_name": null, - "node": "B2:1", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:2", - "name": "Novi02:2", - "short_name": null, - "node": "B2:2", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:3", - "name": "Novi02:3", - "short_name": null, - "node": "B2:3", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:4", - "name": "Novi02:4", - "short_name": null, - "node": "B2:3", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:node:sax:B3", - "name": "sax:Novi03", - "short_name": "B3", - "location": { - "address": "Fortaleza", - "latitude": -38.52443289673026, - "longitude": -3.73163824920348 - }, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:1", - "name": "Novi02:3", - "short_name": null, - "node": "B3:1", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:sax:B3:2", - "name": "Novi02:3", - "short_name": null, - "node": "B3:2", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:sax:B3:3", - "name": "Novi03:3", - "short_name": null, - "node": "B3:3", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:node:sax:A1", - "name": "sax:Novi100", - "short_name": "A1", - "location": { - "address": "Santiago", - "latitude": -70.64634765264213, - "longitude": -33.4507049233331 - }, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:A1:1", - "name": "Novi100:1", - "short_name": null, - "node": "A1:1", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:sax:A1:2", - "name": "Novi100:2", - "short_name": null, - "node": "A1:2", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:node:zaoxi:B1", - "name": "zaoxi:Novi01", - "short_name": "B1", - "location": { - "address": "Sangano", - "latitude": 13.216709879405311, - "longitude": -9.533459658700743 - }, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:1", - "name": "Novi01:1", - "short_name": null, - "node": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:2", - "name": "Novi01:2", - "short_name": null, - "node": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:3", - "name": "Novi01:3", - "short_name": null, - "node": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:node:zaoxi:B2", - "name": "zaoxi:Novi02", - "short_name": "B2", - "location": { - "address": "CapeTown", - "latitude": -38.52443289673026, - "longitude": -3.73163824920348 - }, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:1", - "name": "Novi02:1", - "short_name": null, - "node": "B2:1", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:2", - "name": "Novi02:2", - "short_name": null, - "node": "B2:2", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:3", - "name": "Novi02:3", - "short_name": null, - "node": "B2:3", - "label_range": [ - "100-200", - "10001" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:node:zaoxi:A1", - "name": "zaoxi:Novi100", - "short_name": "A1", - "location": { - "address": "Karoo", - "latitude": 22.541224555821298, - "longitude": -32.3632301851245 - }, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:1", - "name": "Novi100:1", - "short_name": null, - "node": "A1:1", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:2", - "name": "Novi100:2", - "short_name": null, - "node": "A1:2", - "label_range": [ - "100-200", - "1000" - ], - "status": null, - "state": null, - "private_attributes": null - } - ], - "private_attributes": null - } - ], - "links": [ - { - "id": "urn:ogf:network:sdx:link:amlight:B1-B2", - "name": "amlight:B1-B2", - "short_name": "Miami-BocaRaton", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B1:2", - "name": "Novi01:2", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:2", - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:amlight:A1-B1", - "name": "amlight:A1-B1", - "short_name": "redclara-miami", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B1:3", - "name": "Novi01:3", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:amlight:A1-B2", - "name": "amlight:A1-B2", - "short_name": "redclara-BocaRaton", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:sdx:node:amlight.net:A1", - "short_name": "A1:2", - "status": "up" - }, - { - "id": "urn:sdx:port:amlight.net:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:sax:B1-B2", - "name": "sax:B1-B2", - "short_name": "SaoPaulo-Fortaleza", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:2", - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:sax:Panama-Fortaleza", - "name": "sax:Panama-Fortaleza", - "short_name": "Panama-Fortaleza", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:4", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:4", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:sax:SanPaolo-Fortaleza", - "name": "nni:SanPaolo-Fortaleza", - "short_name": "BocaRaton-Fortaleza", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi03:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:3", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:4", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:4", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:sax:A1-B1", - "name": "sax:A1-B1", - "short_name": "redclara-SaoPaulo", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:sax:A1-B2", - "name": "sax:A1-B2", - "short_name": "redclara-Fortaleza", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:sax:A1", - "short_name": "A1:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:nni:Miami-Sanpaolo", - "name": "nni:Miami-Sanpaolo", - "short_name": "Miami-Sanpaolo", - "ports": [ - { - "id": "urn:sdx:port:amlight:B1:1", - "name": "Novi01:1", - "node": "urn:sdx:node:amlight.net:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:port:sax:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 10, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:nni:BocaRaton-Fortaleza", - "name": "nni:BocaRaton-Fortaleza", - "short_name": "BocaRaton-Fortaleza", - "ports": [ - { - "id": "urn:sdx:port:amlight.net:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:sdx:node:amlight.net:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:sax:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:ogf:network:sdx:node:sax:B2", - "short_name": "B2:1", - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 10, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:zaoxi:B1-B2", - "name": "zaoxi:B1-B2", - "short_name": "Sangano-Capetown", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:2", - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:zaoxi:A1-B1", - "name": "zaoxi:A1-B1", - "short_name": "Karoo-Sangano", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:zaoxi:A1-B2", - "name": "zaoxi:A1-B2", - "short_name": "Karoo-Capetown", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 5, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - }, - { - "id": "urn:ogf:network:sdx:link:nni:Fortaleza-Sangano", - "name": "nni:Fortaleza-Sangano", - "short_name": "Fortaleza-Sangano", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "bandwidth": 100000, - "residual_bandwidth": 100000, - "latency": 10, - "packet_loss": 59.621339166831824, - "availability": 56.37376656633328, - "status": null, - "state": null, - "private_attributes": null, - "time_stamp": null, - "measurement_period": null - } - ], - "private_attributes": null -} \ No newline at end of file diff --git a/tests/data/test_MC_solution.json b/tests/data/test_MC_solution.json deleted file mode 100644 index c9055189..00000000 --- a/tests/data/test_MC_solution.json +++ /dev/null @@ -1,51 +0,0 @@ -[ - { - "1": [ - [ - 1, - 9 - ], - [ - 9, - 11 - ] - ], - "2": [ - [ - 3, - 1 - ], - [ - 1, - 12 - ], - [ - 12, - 0 - ], - [ - 0, - 18 - ] - ], - "3": [ - [ - 2, - 12 - ], - [ - 12, - 16 - ], - [ - 16, - 9 - ], - [ - 9, - 13 - ] - ] - }, - 14195698.0 -] \ No newline at end of file diff --git a/tests/data/test_connection.json b/tests/data/test_connection.json deleted file mode 100644 index 666d07ea..00000000 --- a/tests/data/test_connection.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - [ - 1, - 11, - 56, - 1344 - ], - [ - 3, - 18, - 17, - 1309 - ], - [ - 2, - 13, - 95, - 1488 - ] -] \ No newline at end of file diff --git a/tests/data/test_request.json b/tests/data/test_request.json deleted file mode 100644 index aeb26507..00000000 --- a/tests/data/test_request.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "id", - "name": "AMLight", - "start_time": "2000-01-23T04:56:07.000Z", - "end_time": "2000-01-23T04:56:07.000Z", - "bandwidth_required": 10, - "latency_required": 300, - "egress_port": - { - "id": "urn:sdx:port:amlight.net:A1:1", - "name": "Novi100:1", - "node": "urn:sdx:node:amlight.net:A1", - "status": "up" - }, - "ingress_port": - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:2", - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "status": "up" - } -} \ No newline at end of file diff --git a/tests/data/zaoxi.json b/tests/data/zaoxi.json deleted file mode 100644 index 85260748..00000000 --- a/tests/data/zaoxi.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "id": "urn:ogf:network:sdx:topology:zaoxi.net", - "name": "ZAOXI-OXP", - "time_stamp": "2000-01-23T04:56:07+00:00", - "version": 1, - "model_version":"1.0.0", - "links": [ - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:zaoxi:B1-B2", - "latency": 5, - "name": "zaoxi:B1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:2", - "status": "up" - } - ], - "short_name": "Sangano-Capetown", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:zaoxi:A1-B1", - "latency": 5, - "name": "zaoxi:A1-B1", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Karoo-Sangano", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:zaoxi:A1-B2", - "latency": 5, - "name": "zaoxi:A1-B2", - "packet_loss": 59.621339166831824, - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "Karoo-Capetown", - "bandwidth": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:nni:Fortaleza-Sangano", - "latency": 10, - "name": "nni:Fortaleza-Sangano", - "packet_loss": 59.621339166831824, - "nni": "True", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:sax:B3:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:sax:B3", - "short_name": "B3:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "Fortaleza-Sangano", - "bandwidth": 100000 - } - ], - "nodes": [ - { - "id": "urn:ogf:network:sdx:node:zaoxi:B1", - "location": { - "address": "Sangano", - "latitude": -9.533459658700743, - "longitude": 13.216709879405311 - }, - "name": "zaoxi:Novi01", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:1", - "name": "Novi01:1", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:1", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:2", - "name": "Novi01:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:2", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B1:3", - "name": "Novi01:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B1", - "short_name": "B1:3", - "label_range": [ - "100-200", - "10001" - ], - "status": "up" - } - ], - "short_name": "B1" - }, - { - "id": "urn:ogf:network:sdx:node:zaoxi:B2", - "location": { - "address": "CapeTown", - "latitude": -3.73163824920348, - "longitude": -38.52443289673026 - }, - "name": "zaoxi:Novi02", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi02:1", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:2", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:2", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:2", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:B2:3", - "label_range": [ - "100-200", - "10001" - ], - "name": "Novi02:3", - "node": "urn:ogf:network:sdx:node:zaoxi:B2", - "short_name": "B2:3", - "status": "up" - } - ], - "short_name": "B2" - }, - { - "id": "urn:ogf:network:sdx:node:zaoxi:A1", - "location": { - "address": "Karoo", - "latitude": -32.3632301851245, - "longitude": 22.541224555821298 - }, - "name": "zaoxi:Novi100", - "ports": [ - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:1", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:1", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:1", - "status": "up" - }, - { - "id": "urn:ogf:network:sdx:port:zaoxi:A1:2", - "label_range": [ - "100-200", - "1000" - ], - "name": "Novi100:2", - "node": "urn:ogf:network:sdx:node:zaoxi:A1", - "short_name": "A1:2", - "status": "up" - } - ], - "short_name": "A1" - } - ] -} \ No newline at end of file diff --git a/tests/test_Solver.py b/tests/test_Solver.py deleted file mode 100644 index 67ab2b96..00000000 --- a/tests/test_Solver.py +++ /dev/null @@ -1,114 +0,0 @@ -import json -import pathlib -import unittest - -from sdx.pce.load_balancing.te_solver import TESolver -from sdx.pce.models import ConnectionSolution -from sdx.pce.topology.temanager import TEManager - - -class SolverTests(unittest.TestCase): - """ - Check that the solver from pce does what we expects it to do. - """ - - TEST_DATA_DIR = pathlib.Path(__file__).parent.joinpath("data") - - TOPOLOGY_SDX = TEST_DATA_DIR.joinpath("sdx.json") - CONNECTION_REQ = TEST_DATA_DIR.joinpath("test_request.json") - - TOPOLOGY_AMLIGHT = TEST_DATA_DIR.joinpath("amlight.json") - TOPOLOGY_SAX = TEST_DATA_DIR.joinpath("sax.json") - TOPOLOGY_ZAOXI = TEST_DATA_DIR.joinpath("zaoxi.json") - - TOPOLOGY_FILE_LIST = [TOPOLOGY_AMLIGHT, TOPOLOGY_ZAOXI, TOPOLOGY_SAX] - TOPOLOGY_FILE_LIST_UPDATE = [TOPOLOGY_AMLIGHT, TOPOLOGY_ZAOXI, TOPOLOGY_SAX] - - def setUp(self): - with open(self.TOPOLOGY_SDX, "r", encoding="utf-8") as t: - topology_data = json.load(t) - with open(self.CONNECTION_REQ, "r", encoding="utf-8") as c: - connection_data = json.load(c) - - self.temanager = TEManager(topology_data, connection_data) - - def test_computation_breakdown(self): - graph = self.temanager.generate_graph_te() - connection_request = self.temanager.generate_connection_te() - - print(f"Number of nodes: {graph.number_of_nodes()}") - print(f"Graph edges: {graph.edges}") - print(f"Traffic Matrix: {connection_request}") - - solution = TESolver(graph, connection_request).solve() - print(f"TESolver result: {solution}") - - self.assertIsInstance(solution, ConnectionSolution) - self.assertEqual(solution.cost, 5.0) - - breakdown = self.temanager.generate_connection_breakdown(solution) - print(f"Breakdown: {breakdown}") - self.assertIsNotNone(breakdown) - - def test_computation_breakdown_many_topologies(self): - for topology_file in self.TOPOLOGY_FILE_LIST: - print(f"Adding Topology: {topology_file}") - with open(topology_file, "r", encoding="utf-8") as data_file: - data = json.load(data_file) - self.temanager.topology_manager.add_topology(data) - - graph = self.temanager.generate_graph_te() - print(f"Graph: {graph}") - - connection_request = self.temanager.generate_connection_te() - print(f"Connection Request: {connection_request}") - - conn = self.temanager.requests_connectivity(connection_request) - print(f"Graph connectivity: {conn}") - - solution = TESolver(graph, connection_request).solve() - print(f"TESolver result: {solution}") - - # The reality, for now, is that TE Solver has not been able to - # compute a path. - self.assertIsNone(solution.connection_map, "No path was computed") - self.assertEqual(solution.cost, 0) - - breakdown = self.temanager.generate_connection_breakdown(solution) - print(f"Breakdown: {breakdown}") - self.assertIsNone(breakdown) - - def test_computation_update(self): - for topology_file in self.TOPOLOGY_FILE_LIST: - print(f"Adding Topology: {topology_file}") - with open(topology_file, "r", encoding="utf-8") as data_file: - data = json.load(data_file) - self.temanager.add_topology(data) - - for topology_file in self.TOPOLOGY_FILE_LIST_UPDATE: - print(f"Updating Topology: {topology_file}") - with open(topology_file, "r", encoding="utf-8") as data_file: - data = json.load(data_file) - self.temanager.update_topology(data) - - graph = self.temanager.generate_graph_te() - connection_request = self.temanager.generate_connection_te() - - conn = self.temanager.requests_connectivity(connection_request) - print(f"Graph connectivity: {conn}") - - solution = TESolver(graph, connection_request).solve() - print(f"TESolver result: {solution}") - - # The reality, for now, is that TE Solver has not been able to - # compute a path. - self.assertIsNone(solution.connection_map, "No path was computed") - self.assertEqual(solution.cost, 0) - - breakdown = self.temanager.generate_connection_breakdown(solution) - print(f"Breakdown: {breakdown}") - self.assertIsNone(breakdown) - - -if __name__ == "__main__": - unittest.main()