diff --git a/src/sdx_pce/topology/temanager.py b/src/sdx_pce/topology/temanager.py index 29a4eefc..46165086 100644 --- a/src/sdx_pce/topology/temanager.py +++ b/src/sdx_pce/topology/temanager.py @@ -408,6 +408,14 @@ def get_links_on_path(self, solution: ConnectionSolution) -> list: return result + def add_breakdowns_to_connection(self, connection_request: dict, breakdowns: dict): + """ + add breakdowns to connection request for the sdx-controller to process. + """ + connection_request["breakdowns"] = breakdowns + + return connection_request + def generate_connection_breakdown( self, solution: ConnectionSolution, connection_request: dict ) -> dict: diff --git a/tests/test_te_manager.py b/tests/test_te_manager.py index 519f4ac2..f7b6355d 100644 --- a/tests/test_te_manager.py +++ b/tests/test_te_manager.py @@ -363,6 +363,14 @@ def test_connection_amlight_to_zaoxi(self): ) print(f"breakdown: {json.dumps(breakdown)}") + connection_request = temanager.add_breakdowns_to_connection( + connection_request, breakdown + ) + + temanager._logger.info( + f"connection_request with breakdowns: {connection_request}" + ) + # Note that the "domain" key is correct in the breakdown # result when we initialize TEManager with None for topology, # and later add individual topologies with add_topology().