atlanticwave-sdx / sdx-controller

Central Controller for AtlanticWave SDX.
https://www.atlanticwave-sdx.net
MIT License
2 stars 3 forks source link

Read connection from db #332

Closed congwang09 closed 1 month ago

congwang09 commented 1 month ago

We changed this part to get connection using get_connection_status(). But this causes some inconsistency if connection contains some extra fields, such as qoe_metrics from this request:

{
    "description": "This is an example to demonstrate a L2VPN with optional attributes",
    "endpoints": [
      {
        "id": "urn:sdx:port:ampath.net:Novi03:1",
        "name": "urn:sdx:port:ampath.net:Novi03:1",
        "vlan_range": "any"
      },
      {
        "id": "urn:sdx:port:tenet.ac.za:Novi07:1",
        "name": "urn:sdx:port:tenet.ac.za:Novi07:1",
        "vlan_range": "any"
      }
    ],
    "service_id": "c45ab569-c4f3-4e2e-87c5-fecddaf41966",
    "name": "fabric new test1",
    "qos_metrics": {
      "max_delay": {
        "strict": true,
        "value": 150
      },
      "min_bw": {
        "strict": false,
        "value": 5
      }
    }
}

This PR changes back to read connection from db when get connection by id.