Commit 9a4d9785 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

PathComp - Frontend:

- Corrected generation of replies
parent 322f7fe2
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@ class _Algorithm:
                for connection in connections:
                    connection_uuid,service_type,path_hops,_ = connection
                    service_key = (context_uuid, connection_uuid)
                    if service_key in grpc_services: continue
                    grpc_service = self.add_service_to_reply(
                        reply, context_uuid, connection_uuid, service_type, path_hops=path_hops,
                        config_rules=orig_config_rules)
@@ -265,10 +266,9 @@ class _Algorithm:
                    grpc_service = grpc_services.get(service_key)
                    if grpc_service is None: raise Exception('Service({:s}) not found'.format(str(service_key)))
                        
                    grpc_connection = grpc_connections.get(connection_uuid)
                    if grpc_connection is not None: continue
                    #if connection_uuid in grpc_connections: continue
                    grpc_connection = self.add_connection_to_reply(reply, connection_uuid, grpc_service, path_hops)
                    grpc_connections[connection_uuid] = grpc_connection
                    #grpc_connections[connection_uuid] = grpc_connection

                    for sub_service_uuid in dependencies:
                        sub_service_key = (context_uuid, sub_service_uuid)
@@ -281,11 +281,11 @@ class _Algorithm:
                # ... "path-capacity": {"total-size": {"value": 200, "unit": 0}},
                # ... "path-latency": {"fixed-latency-characteristic": "10.000000"},
                # ... "path-cost": {"cost-name": "", "cost-value": "5.000000", "cost-algorithm": "0.000000"},
                #path_capacity = service_path['path-capacity']['total-size']
                #path_capacity = service_path_ero['path-capacity']['total-size']
                #path_capacity_value = path_capacity['value']
                #path_capacity_unit = CapacityUnit(path_capacity['unit'])
                #path_latency = service_path['path-latency']['fixed-latency-characteristic']
                #path_cost = service_path['path-cost']
                #path_latency = service_path_ero['path-latency']['fixed-latency-characteristic']
                #path_cost = service_path_ero['path-cost']
                #path_cost_name = path_cost['cost-name']
                #path_cost_value = path_cost['cost-value']
                #path_cost_algorithm = path_cost['cost-algorithm']