Skip to content
Snippets Groups Projects
Commit ff533e4d authored by martinezric's avatar martinezric
Browse files

Merge branch 'fix/pathcomp-backend-logs' of...

Merge branch 'fix/pathcomp-backend-logs' of https://labs.etsi.org/rep/tfs/controller into fix/pathcomp-backend-logs
parents 86321291 5150d830
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!100PathComp Backend - Adding Logs and kpaths_return
////////////////////////////////////////////////////////////////////////////////////////
/*
* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
*
......@@ -203,34 +202,34 @@ void sp_execution_services(struct compRouteOutputList_t* oPathList) {
//struct service_t* service = &(serviceList->services[i]);
struct service_t* service = (struct service_t*)(listnode->data);
DEBUG_PC("Starting the Computation for ServiceId: %s [ContextId: %s]", service->serviceId.service_uuid, service->serviceId.contextId);
struct compRouteOutput_t* pathService = &(oPathList->compRouteConnection[i]);
// check endpoints of the service are different (PE devices/nodes are different)
if (same_src_dst_pe_nodeid(service) == 0) {
DEBUG_PC("PEs are the same... no path computation");
comp_route_connection_issue_handler(pathService, service);
oPathList->numCompRouteConnList++;
continue;
}
// get the graph associated to the contextId in the contextSet, if no then error
struct graph_t* g = get_graph_by_contextId(contextSet, service->serviceId.contextId);
if (g == NULL) {
DEBUG_PC("The targeted contextId is NOT in the ContextSet ... then NO graph");
comp_route_connection_issue_handler(pathService, service);
oPathList->numCompRouteConnList++;
continue;
}
computation_shortest_path(service, pathService, g);
oPathList->numCompRouteConnList++;
// for each network connectivity service, a single computed path (out of the KCSP) is retuned
// If path is found, then the selected resources must be pre-assigned into the context information
if (pathService->noPathIssue == NO_PATH_CONS_ISSUE) {
continue;
}
struct path_t* path = &(pathService->paths[pathService->numPaths - 1]);
DEBUG_PC("Starting the Computation for ServiceId: %s [ContextId: %s]", service->serviceId.service_uuid, service->serviceId.contextId);
struct compRouteOutput_t* pathService = &(oPathList->compRouteConnection[i]);
// check endpoints of the service are different (PE devices/nodes are different)
if (same_src_dst_pe_nodeid(service) == 0) {
DEBUG_PC("PEs are the same... no path computation");
comp_route_connection_issue_handler(pathService, service);
oPathList->numCompRouteConnList++;
continue;
}
// get the graph associated to the contextId in the contextSet, if no then error
struct graph_t* g = get_graph_by_contextId(contextSet, service->serviceId.contextId);
if (g == NULL) {
DEBUG_PC("The targeted contextId is NOT in the ContextSet ... then NO graph");
comp_route_connection_issue_handler(pathService, service);
oPathList->numCompRouteConnList++;
continue;
}
computation_shortest_path(service, pathService, g);
oPathList->numCompRouteConnList++;
// for each network connectivity service, a single computed path (out of the KCSP) is retuned
// If path is found, then the selected resources must be pre-assigned into the context information
if (pathService->noPathIssue == NO_PATH_CONS_ISSUE) {
continue;
}
struct path_t* path = &(pathService->paths[pathService->numPaths - 1]);
//allocate_graph_resources(path, service, g); // LGR: crashes in some cases with assymetric topos
//allocate_graph_reverse_resources(path, service, g); // LGR: crashes in some cases with assymetric topos
print_graph(g);
......
......@@ -14,7 +14,6 @@
* limitations under the License.
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......
......@@ -14,7 +14,6 @@
* limitations under the License.
*/
#ifndef _PATHCOMP_TOOLS_H
#define _PATHCOMP_TOOLS_H
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment