From ab52cb46cb166237fd58086e45793da6df3ebc6f Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 15 Aug 2023 14:20:41 -0500 Subject: [PATCH 01/12] Remove data files --- src/sdx_pce/data/requests/test_request.json | 22 - src/sdx_pce/data/topologies/amlight.json | 321 ------------- src/sdx_pce/data/topologies/sax.json | 498 -------------------- src/sdx_pce/data/topologies/zaoxi.json | 278 ----------- 4 files changed, 1119 deletions(-) delete mode 100644 src/sdx_pce/data/requests/test_request.json delete mode 100644 src/sdx_pce/data/topologies/amlight.json delete mode 100644 src/sdx_pce/data/topologies/sax.json delete mode 100644 src/sdx_pce/data/topologies/zaoxi.json diff --git a/src/sdx_pce/data/requests/test_request.json b/src/sdx_pce/data/requests/test_request.json deleted file mode 100644 index d747b127..00000000 --- a/src/sdx_pce/data/requests/test_request.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "test-connection-request", - "name": "Test connection request", - "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" - } -} diff --git a/src/sdx_pce/data/topologies/amlight.json b/src/sdx_pce/data/topologies/amlight.json deleted file mode 100644 index 1d87ef73..00000000 --- a/src/sdx_pce/data/topologies/amlight.json +++ /dev/null @@ -1,321 +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": 100000, - "id": "urn:ogf:network:sdx:link:amlight:B1-B2", - "latency": 5, - "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": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:amlight:A1-B1", - "latency": 5, - "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": 100000 - }, - { - "availability": 56.37376656633328, - "residual_bandwidth": 100000, - "id": "urn:ogf:network:sdx:link:amlight:A1-B2", - "latency": 5, - "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": 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, - "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": 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 - } - ], - "nodes": [ - { - "id": "urn:sdx:node:amlight.net:B1", - "location": { - "address": "Miami", - "latitude": 25.75633040531146, - "longitude": -80.37676058477908, - "ISO3166-2-lvl4": "US-MIA" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "B1" - }, - { - "id": "urn:sdx:node:amlight.net:B2", - "location": { - "address": "BocaRaton", - "latitude": 26.381437356374075, - "longitude": -80.10225977485742, - "ISO3166-2-lvl4": "US-BC" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "B2" - }, - { - "id": "urn:sdx:node:amlight.net:A1", - "location": { - "address": "redclara", - "latitude": 30.34943181039702, - "longitude": -81.66666016473143, - "ISO3166-2-lvl4": "US-RC" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "A1" - } - ], - "domain_service": { - "owner":"FIU" - } - } \ No newline at end of file diff --git a/src/sdx_pce/data/topologies/sax.json b/src/sdx_pce/data/topologies/sax.json deleted file mode 100644 index a4f6a7b2..00000000 --- a/src/sdx_pce/data/topologies/sax.json +++ /dev/null @@ -1,498 +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", - "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, - "ISO3166-2-lvl4": "BR-SP" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "B1" - }, - { - "id": "urn:ogf:network:sdx:node:sax:B2", - "location": { - "address": "PanamaCity", - "latitude": 8.993040465928525, - "longitude": -79.4947050137491, - "ISO3166-2-lvl4": "US-PN" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "B2" - }, - { - "id": "urn:ogf:network:sdx:node:sax:B3", - - "location": { - "address": "Fortaleza", - "latitude": -3.73163824920348, - "longitude": -38.52443289673026, - "ISO3166-2-lvl4": "BR-FR" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "B3" - }, - { - "id": "urn:ogf:network:sdx:node:sax:A1", - "location": { - "address": "Santiago", - "latitude": -33.4507049233331, - "longitude": -70.64634765264213, - "ISO3166-2-lvl4": "CL-SN" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "A1" - } - ], - "domain_service": { - "owner":"RNP" - } -} diff --git a/src/sdx_pce/data/topologies/zaoxi.json b/src/sdx_pce/data/topologies/zaoxi.json deleted file mode 100644 index 2488d380..00000000 --- a/src/sdx_pce/data/topologies/zaoxi.json +++ /dev/null @@ -1,278 +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, - "ISO3166-2-lvl4": "IT-SN" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "B1" - }, - { - "id": "urn:ogf:network:sdx:node:zaoxi:B2", - "location": { - "address": "CapeTown", - "latitude": -3.73163824920348, - "longitude": -38.52443289673026, - "ISO3166-2-lvl4": "ZA-WC" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "B2" - }, - { - "id": "urn:ogf:network:sdx:node:zaoxi:A1", - "location": { - "address": "Karoo", - "latitude": -32.3632301851245, - "longitude": 22.541224555821298, - "ISO3166-2-lvl4": "ZA-KR" - }, - "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", - "state": "enabled" - }, - { - "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", - "state": "enabled" - } - ], - "short_name": "A1" - } - ] -} From b33b7e1d72e5f2c97daafc2db0a7ea41787debb7 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 15 Aug 2023 14:21:10 -0500 Subject: [PATCH 02/12] Update datamodel requirement --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e31e80b8..0ac279f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ "pydot", "dataclasses-json", "importlib-resources; python_version < '3.9'", - "sdxdatamodel @ git+https://github.com/atlanticwave-sdx/datamodel@2.0.0" + "sdx-datamodel @ git+https://github.com/atlanticwave-sdx/datamodel@103.topology-files-refactoring" ] [project.urls] From ac8f205c1c9e22842bd2eb995e46b9e0ee70e11e Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 15 Aug 2023 14:31:08 -0500 Subject: [PATCH 03/12] Update datamodel imports --- src/sdx_pce/topology/grenmlconverter.py | 2 +- src/sdx_pce/topology/manager.py | 4 ++-- src/sdx_pce/topology/temanager.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sdx_pce/topology/grenmlconverter.py b/src/sdx_pce/topology/grenmlconverter.py index 088d4c62..b80245db 100644 --- a/src/sdx_pce/topology/grenmlconverter.py +++ b/src/sdx_pce/topology/grenmlconverter.py @@ -1,6 +1,6 @@ from grenml import GRENMLManager from grenml.models.nodes import Node -from sdx.datamodel.models.topology import Topology +from sdx_datamodel.models.topology import Topology class GrenmlConverter(object): diff --git a/src/sdx_pce/topology/manager.py b/src/sdx_pce/topology/manager.py index 6a5feb28..2684a78c 100644 --- a/src/sdx_pce/topology/manager.py +++ b/src/sdx_pce/topology/manager.py @@ -2,11 +2,11 @@ import datetime import networkx as nx -from sdx.datamodel.models.topology import ( +from sdx_datamodel.models.topology import ( TOPOLOGY_INITIAL_VERSION, SDX_TOPOLOGY_ID_prefix, ) -from sdx.datamodel.parsing.topologyhandler import TopologyHandler +from sdx_datamodel.parsing.topologyhandler import TopologyHandler from .grenmlconverter import GrenmlConverter diff --git a/src/sdx_pce/topology/temanager.py b/src/sdx_pce/topology/temanager.py index eb891122..d16f853e 100644 --- a/src/sdx_pce/topology/temanager.py +++ b/src/sdx_pce/topology/temanager.py @@ -4,7 +4,7 @@ import networkx as nx from networkx.algorithms import approximation as approx -from sdx.datamodel.parsing.connectionhandler import ConnectionHandler +from sdx_datamodel.parsing.connectionhandler import ConnectionHandler from sdx_pce.models import ( ConnectionPath, @@ -109,7 +109,7 @@ def _update_vlan_tags_table(self, domain_name, port_list): self._vlan_tags_table[domain_name] = {} for port_id, link in port_list.items(): - # TODO: port here seems to be a dict, not sdx.datamodel.models.Port + # TODO: port here seems to be a dict, not sdx_datamodel.models.Port for port in link.ports: # TODO: sometimes port_id and "inner" port_id below # can be different. Why? For example, port_id of From 63fae9447a936dd9da261b48e17ae2ff4864d1a4 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 15 Aug 2023 14:31:35 -0500 Subject: [PATCH 04/12] Make importlib-resources a test requirement --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0ac279f7..10da00b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,6 @@ dependencies = [ "prtpy", "pydot", "dataclasses-json", - "importlib-resources; python_version < '3.9'", "sdx-datamodel @ git+https://github.com/atlanticwave-sdx/datamodel@103.topology-files-refactoring" ] @@ -42,6 +41,7 @@ Issues = "https://github.com/atlanticwave-sdx/pce/issues" test = [ "pytest >= 7.1.2", "pytest-cov >= 3.0.0", + "importlib-resources; python_version < '3.9'", ] pygraphviz = [ "pygraphviz" From 6d6870faf9ae587f47aa6c4b361096c4aa601a0a Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Tue, 15 Aug 2023 14:31:57 -0500 Subject: [PATCH 05/12] Use static topology/request files from datamodel --- tests/__init__.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index cb38e0d3..32edc37c 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -10,13 +10,15 @@ class TestData: - # Some data files are in src/sdx_pce/data. - PACKAGE_DATA_DIR = files("sdx_pce") / "data" + # Some data files are in src/sdx_datamodel/data. + TOPOLOGY_DIR = files("sdx_datamodel") / "data" / "topologies" + TOPOLOGY_FILE_ZAOXI = TOPOLOGY_DIR / "zaoxi.json" + TOPOLOGY_FILE_SAX = TOPOLOGY_DIR / "sax.json" + TOPOLOGY_FILE_AMLIGHT = TOPOLOGY_DIR / "amlight.json" + TOPOLOGY_FILE_SDX = TOPOLOGY_DIR / "sdx.json" - TOPOLOGY_FILE_ZAOXI = PACKAGE_DATA_DIR / "topologies" / "zaoxi.json" - TOPOLOGY_FILE_SAX = PACKAGE_DATA_DIR / "topologies" / "sax.json" - TOPOLOGY_FILE_AMLIGHT = PACKAGE_DATA_DIR / "topologies" / "amlight.json" - CONNECTION_REQ = PACKAGE_DATA_DIR / "requests" / "test_request.json" + REQUESTS_DIR = files("sdx_datamodel") / "data" / "requests" + CONNECTION_REQ = REQUESTS_DIR / "test_request.json" # Write test output files in OS temporary directory. TEST_OUTPUT_DIR = pathlib.Path(tempfile.gettempdir()) @@ -27,7 +29,6 @@ class TestData: # Other test data files. TEST_DATA_DIR = pathlib.Path(__file__).parent / "data" - TOPOLOGY_FILE_SDX = TEST_DATA_DIR / "sdx.json" CONNECTION_REQ_AMLIGHT = TEST_DATA_DIR / "test_request_amlight.json" TOPOLOGY_FILE_SAX_2 = TEST_DATA_DIR / "sax-2.json" From 7b8485f45aea23eed4c54b2353fcb51c1b899642 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Wed, 16 Aug 2023 14:05:06 -0500 Subject: [PATCH 06/12] Use datamodel 2.0.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 10da00b6..86f64590 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "prtpy", "pydot", "dataclasses-json", - "sdx-datamodel @ git+https://github.com/atlanticwave-sdx/datamodel@103.topology-files-refactoring" + "sdx-datamodel @ git+https://github.com/atlanticwave-sdx/datamodel@2.0.1" ] [project.urls] From b8d82e22fb7e7b08ebf54970c95257faa3bd7269 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 21 Aug 2023 07:00:18 -0500 Subject: [PATCH 07/12] Use pyproject.toml as the cache dependency path --- .github/workflows/checks.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 705d3ca6..33465936 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -25,7 +25,7 @@ jobs: with: python-version: "3.9" cache: 'pip' # cache pip dependencies - cache-dependency-path: setup.cfg + cache-dependency-path: pyproject.toml - name: Install dependencies run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc9b3381..9e3d6d44 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,7 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: 'pip' # caching pip dependencies - cache-dependency-path: setup.cfg + cache-dependency-path: pyproject.toml - name: Install dependencies run: | From cc622eda77058349b42634fcd0f32b310f382ed2 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 21 Aug 2023 07:01:37 -0500 Subject: [PATCH 08/12] Update a CI step name --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 33465936..a05ced5f 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -27,7 +27,7 @@ jobs: cache: 'pip' # cache pip dependencies cache-dependency-path: pyproject.toml - - name: Install dependencies + - name: Install tools run: | python -m pip install --upgrade pip python -m pip install black isort From f35186ce99935bf8dc33b52d8442ee5b7af5c03d Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 21 Aug 2023 07:02:26 -0500 Subject: [PATCH 09/12] Do not run workflows against develop --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e3d6d44..af6d1252 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,9 +7,11 @@ name: Test on: push: - branches: [ "main", "develop" ] + branches: + - main pull_request: - branches: [ "main", "develop" ] + branches: + - main permissions: contents: read From 6d8d1982f10eae2bbfe672b7903cc3e3f76c3dad Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 21 Aug 2023 07:05:45 -0500 Subject: [PATCH 10/12] Use test dependencies from pyproject.toml --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 95c2f0a2..74006c4a 100644 --- a/tox.ini +++ b/tox.ini @@ -15,8 +15,7 @@ description = run the tests with pytest package = wheel wheel_build_env = .pkg deps = - pytest>=6 - pytest-cov + [test] commands = pytest {tty:--color=yes} {posargs} From 436e09a08bdb11a8dcee950489a16aad3f86db50 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 21 Aug 2023 07:12:52 -0500 Subject: [PATCH 11/12] Update tox env descriptions --- tox.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 74006c4a..6cd6b034 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ requires = tox>=4 [testenv] -description = run the tests with pytest +description = run tests with pytest package = wheel wheel_build_env = .pkg deps = @@ -21,6 +21,6 @@ commands = pytest {tty:--color=yes} {posargs} [testenv:extras] -description = run tests, with optional dependencies installed. -extras = - pygraphviz +description = run tests, with extra dependencies installed. +extras = + pygraphviz From 48c7c34d530d0917fb2dfcb304b03e917ffd6811 Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Mon, 21 Aug 2023 07:15:11 -0500 Subject: [PATCH 12/12] Bump up datamodel requirement --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 86f64590..da024d21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "prtpy", "pydot", "dataclasses-json", - "sdx-datamodel @ git+https://github.com/atlanticwave-sdx/datamodel@2.0.1" + "sdx-datamodel @ git+https://github.com/atlanticwave-sdx/datamodel@2.0.2" ] [project.urls]