kytos-ng / telemetry_int

Kytos Telemetry Napp
MIT License
0 stars 2 forks source link

feat: handled kytos/mef_eline.undeployed event #85

Closed viniarck closed 2 months ago

viniarck commented 2 months ago

Closes #84

Summary

See updated changelog file

Local Tests

kytos $> 2024-04-16 12:53:11,077 - INFO [kytos.napps.kytos/flow_manager] (AnyIO worker thread) Send FlowMod from request dpid: 00:00:00:00:00:00:00:06, command: delete, force: True,  fl
ows[0, 1]: [{'cookie': 12288710410465943630, 'cookie_mask': 18446744073709551615}]
2024-04-16 12:53:11,083 - INFO [uvicorn.access] (MainThread) 127.0.0.1:60582 - "POST /api/kytos/flow_manager/v2/delete/00%3A00%3A00%3A00%3A00%3A00%3A00%3A06 HTTP/1.1" 202
2024-04-16 12:53:11,085 - INFO [kytos.napps.kytos/flow_manager] (AnyIO worker thread) Send FlowMod from request dpid: 00:00:00:00:00:00:00:01, command: delete, force: True,  flows[0, 1]
: [{'cookie': 12288710410465943630, 'cookie_mask': 18446744073709551615}]
2024-04-16 12:53:11,091 - INFO [uvicorn.access] (MainThread) 127.0.0.1:60586 - "POST /api/kytos/flow_manager/v2/delete/00%3A00%3A00%3A00%3A00%3A00%3A00%3A01 HTTP/1.1" 202
2024-04-16 12:53:11,094 - INFO [uvicorn.access] (MainThread) 127.0.0.1:60568 - "PATCH /api/kytos/mef_eline/v2/evc/8a45028b77a04e HTTP/1.1" 200
2024-04-16 12:53:11,094 - INFO [kytos.napps.kytos/telemetry_int] (MainThread) Handling mef_eline.undeployed on EVC id: 8a45028b77a04e
2024-04-16 12:53:11,110 - INFO [uvicorn.access] (MainThread) 127.0.0.1:60600 - "GET /api/kytos/flow_manager/v2/stored_flows?state=installed&state=pending HTTP/1.1" 200
2024-04-16 12:53:11,119 - INFO [kytos.napps.kytos/flow_manager] (thread_pool_app_9) Send FlowMod from KytosEvent dpid: 00:00:00:00:00:00:00:01, command: delete, force: True,  flows[0, 1
]: [{'cookie': 12144595222390087758, 'cookie_mask': 18446744073709551615, 'table_id': 255}]
2024-04-16 12:53:11,120 - INFO [kytos.napps.kytos/flow_manager] (thread_pool_app_7) Send FlowMod from KytosEvent dpid: 00:00:00:00:00:00:00:06, command: delete, force: True,  flows[0, 1
]: [{'cookie': 12144595222390087758, 'cookie_mask': 18446744073709551615, 'table_id': 255}]
2024-04-16 12:53:11,130 - INFO [uvicorn.access] (MainThread) 127.0.0.1:60616 - "POST /api/kytos/mef_eline/v2/evc/metadata HTTP/1.1" 201
kytos $> 

❯ http http://localhost:8181/api/kytos/telemetry_int/v1/evc/                      
HTTP/1.1 200 OK
content-length: 943
content-type: application/json
date: Tue, 16 Apr 2024 15:53:48 GMT
server: uvicorn

{
    "8a45028b77a04e": {
        "active": false,
        "archived": false,
        "backup_links": [],
        "backup_path": [],
        "bandwidth": 0,
        "circuit_scheduler": [],
        "creation_time": "2024-04-16T15:52:13",
        "current_path": [],
        "dynamic_backup_path": true,
        "enabled": false,
        "end_date": null,
        "execution_rounds": 0,
        "failover_path": [],
        "flow_removed_at": "2024-04-16T15:53:11",
        "id": "8a45028b77a04e",
        "metadata": {
            "telemetry": {
                "enabled": true,
                "status": "DOWN",
                "status_reason": [
                    "undeployed"
                ],
                "status_updated_at": "2024-04-16T15:53:11"
            }
        },
        "name": "inter_evpl_2222",
        "owner": null,
        "primary_constraints": {},
        "primary_links": [],
        "primary_path": [],
        "queue_id": -1,
        "request_time": "2024-04-16T15:52:13",
        "sb_priority": null,
        "secondary_constraints": {},
        "service_level": 6,
        "start_date": "2024-04-16T15:52:13",
        "uni_a": {
            "interface_id": "00:00:00:00:00:00:00:01:15",
            "tag": {
                "tag_type": "vlan",
                "value": 2222
            }
        },
        "uni_z": {
            "interface_id": "00:00:00:00:00:00:00:06:22",
            "tag": {
                "tag_type": "vlan",
                "value": 2222
            }
        },
        "updated_at": "2024-04-16T15:53:42"
    }
}

End-to-End Tests

N/A yet

viniarck commented 2 months ago

I'll go ahead and merge this