Skip to content
Snippets Groups Projects
Commit ae6bc78b authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

PathComp:

- Added definition of algorithm in proto file
- Minor code comments and TODOs added
parent f4cff5db
No related branches found
No related tags found
1 merge request!54Release 2.0.0
......@@ -21,8 +21,19 @@ service PathCompService {
rpc Compute(PathCompRequest) returns (PathCompReply) {}
}
message Algorithm_ShortestPath {}
message Algorithm_KShortestPath {
uint32 k_inspection = 1;
uint32 k_return = 2;
}
message PathCompRequest {
repeated context.Service services = 1;
oneof algorithm {
Algorithm_ShortestPath shortest_path = 10;
Algorithm_KShortestPath k_shortest_path = 11;
}
}
message PathCompReply {
......
......@@ -38,6 +38,8 @@ class PathCompServiceServicerImpl(PathCompServiceServicer):
context_client = ContextClient()
# TODO: consider filtering resources
grpc_contexts = context_client.ListContexts(Empty())
grpc_devices = context_client.ListDevices(Empty())
grpc_links = context_client.ListLinks(Empty())
......
......@@ -93,8 +93,8 @@ LINK_C2_C3_ID, LINK_C2_C3 = compose_link(DEVICE_C2_ENDPOINTS[1], DEVICE_C3_ENDPO
# ----- Service --------------------------------------------------------------------------------------------------------
SERVICE_A1_B1 = compose_service(DEVICE_A1_ENDPOINTS[2], DEVICE_B1_ENDPOINTS[2], constraints=[
json_constraint('bandwidth', 10.0),
json_constraint('latency_ms', 5.0)
json_constraint('bandwidth[gbps]', 10.0),
json_constraint('latency[ms]', 5.0),
])
# ----- Containers -----------------------------------------------------------------------------------------------------
......
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