Closed viniarck closed 8 months ago
Closes #59
This PR is on top of PR #56
GET /v1/evc
v1/evc
❯ http http://localhost:8181/api/kytos/telemetry_int/v1/evc | jq { "9093192378aa4d": { "active": false, "archived": false, "backup_path": [], "bandwidth": 0, "circuit_scheduler": [], "current_path": [ { "id": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07", "endpoint_a": { "id": "00:00:00:00:00:00:00:01:4", "name": "s1-eth4", "port_number": 4, "mac": "92:09:64:f9:31:36", "switch": "00:00:00:00:00:00:00:01", "type": "interface", "nni": true, "uni": false, "speed": 1250000000.0, "metadata": {}, "lldp": true, "active": false, "enabled": true, "status": "DOWN", "status_reason": [ "deactivated" ], "link": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07" }, "endpoint_b": { "id": "00:00:00:00:00:00:00:03:3", "name": "s3-eth3", "port_number": 3, "mac": "4e:8a:bf:9d:b4:ba", "switch": "00:00:00:00:00:00:00:03", "type": "interface", "nni": true, "uni": false, "speed": 1250000000.0, "metadata": {}, "lldp": true, "active": false, "enabled": true, "status": "DOWN", "status_reason": [ "deactivated" ], "link": "c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07" }, "metadata": { "s_vlan": { "tag_type": 1, "value": 1 } }, "active": false, "enabled": true, "status": "DOWN", "status_reason": [ "deactivated" ] } ], "dynamic_backup_path": true, "enabled": true, "failover_path": [ { "id": "78282c4d5b579265f04ebadc4405ca1b49628eb1d684bb45e5d0607fa8b713d0", "endpoint_a": { "id": "00:00:00:00:00:00:00:01:3", "name": "s1-eth3", "port_number": 3, "mac": "ce:cb:4b:8b:7e:b2", "switch": "00:00:00:00:00:00:00:01", "type": "interface", "nni": true, "uni": false, "speed": 1250000000.0, "metadata": {}, "lldp": true, "active": false, "enabled": true, "status": "DOWN", "status_reason": [ "deactivated" ], "link": "78282c4d5b579265f04ebadc4405ca1b49628eb1d684bb45e5d0607fa8b713d0" }, "endpoint_b": { "id": "00:00:00:00:00:00:00:02:2", "name": "s2-eth2", "port_number": 2, "mac": "82:6e:ca:7b:a3:fd", "switch": "00:00:00:00:00:00:00:02", "type": "interface", "nni": true, "uni": false, "speed": 1250000000.0, "metadata": {}, "lldp": true, "active": false, "enabled": true, "status": "DOWN", "status_reason": [ "deactivated" ], "link": "78282c4d5b579265f04ebadc4405ca1b49628eb1d684bb45e5d0607fa8b713d0" }, "metadata": { "s_vlan": { "tag_type": 1, "value": 1 } }, "active": false, "enabled": true, "status": "DOWN", "status_reason": [ "deactivated" ] }, { "id": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30", "endpoint_a": { "id": "00:00:00:00:00:00:00:02:3", "name": "s2-eth3", "port_number": 3, "mac": "e2:28:35:3d:eb:d9", "switch": "00:00:00:00:00:00:00:02", "type": "interface", "nni": true, "uni": false, "speed": 1250000000.0, "metadata": {}, "lldp": true, "active": false, "enabled": true, "status": "DOWN", "status_reason": [ "deactivated" ], "link": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30" }, "endpoint_b": { "id": "00:00:00:00:00:00:00:03:2", "name": "s3-eth2", "port_number": 2, "mac": "a6:ad:3b:3f:88:de", "switch": "00:00:00:00:00:00:00:03", "type": "interface", "nni": true, "uni": false, "speed": 1250000000.0, "metadata": {}, "lldp": true, "active": false, "enabled": true, "status": "DOWN", "status_reason": [ "deactivated" ], "link": "4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30" }, "metadata": { "s_vlan": { "tag_type": 1, "value": 1 } }, "active": false, "enabled": true, "status": "DOWN", "status_reason": [ "deactivated" ] } ], "id": "9093192378aa4d", "metadata": { "telemetry": { "enabled": true, "status": "UP", "status_reason": [], "status_updated_at": "2023-10-05T13:25:27" } }, "name": "evpl", "primary_path": [], "service_level": 6, "uni_a": { "tag": { "tag_type": 1, "value": 101 }, "interface_id": "00:00:00:00:00:00:00:01:1" }, "uni_z": { "tag": { "tag_type": 1, "value": 102 }, "interface_id": "00:00:00:00:00:00:00:03:1" }, "sb_priority": null, "execution_rounds": 0, "owner": null, "queue_id": null, "primary_constraints": { "mandatory_metrics": { "ownership": "blue" } }, "secondary_constraints": { "mandatory_metrics": { "ownership": "blue" } }, "primary_links": [], "backup_links": [], "start_date": "2023-10-03T15:21:34", "creation_time": "2023-10-03T15:21:34", "request_time": "2023-10-03T15:21:34", "end_date": null, "flow_removed_at": null, "updated_at": "2023-10-05T13:40:33" } } ❯ echo '{"evc_ids": []}' | http http://localhost:8181/api/kytos/telemetry_int/v1/evc/disable HTTP/1.1 200 OK content-length: 18 content-type: application/json date: Thu, 05 Oct 2023 13:41:31 GMT server: uvicorn [ "9093192378aa4d" ] ❯ http http://localhost:8181/api/kytos/telemetry_int/v1/evc | jq {}
N/A yet
Closes #59
This PR is on top of PR #56
Summary
GET /v1/evc
on openapi.yml (the response content follows mef_eline content)Local Tests
v1/evc
wouldn't list it:End-to-End Tests
N/A yet