Skip to content

Commit

Permalink
port_id, id
Browse files Browse the repository at this point in the history
  • Loading branch information
YufengXin committed Oct 22, 2024
1 parent 49fb3b7 commit c81aa76
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions sdx_controller/handlers/connection_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,14 @@ def get_connection_status(db, service_id: str):
domains = breakdown.get(service_id)
logger.info(f"domains for {service_id}: {domains.keys()}")

# Find the name and description from the original connection
# request for this service_id.
name = "unknown"
description = "unknown"
qos_metrics = {}
scheduling = {}
notifications = {}

endpoints = list()
request_endpoints = []
response_endpoints = []
Expand Down Expand Up @@ -373,10 +381,10 @@ def get_connection_status(db, service_id: str):

endpoints.append(endpoint_a)

if request_uni_a.get("port_id") == uni_a_port:
if request_uni_a.get("id") == uni_a_port:
response_endpoints.append(endpoint_a)

if request_uni_z.get("port_id") == uni_a_port:
if request_uni_z.get("id") == uni_a_port:
response_endpoints.append(endpoint_a)

uni_z_port = breakdown.get("uni_z").get("port_id")
Expand All @@ -389,19 +397,11 @@ def get_connection_status(db, service_id: str):

endpoints.append(endpoint_z)

if request_uni_a.get("port_id") == uni_z_port:
if request_uni_a.get("id") == uni_z_port:
response_endpoints.append(endpoint_z)
if request_uni_z.get("port_id") == uni_z_port:
if request_uni_z.get("id") == uni_z_port:
response_endpoints.append(endpoint_z)

# Find the name and description from the original connection
# request for this service_id.
name = "unknown"
description = "unknown"
qos_metrics = {}
scheduling = {}
notifications = {}

# TODO: we're missing many of the attributes in the response here
# which have been specified in the provisioning spec, such as:
# name, description, qos_metrics, notifications, ownership,
Expand Down

0 comments on commit c81aa76

Please sign in to comment.