Loading proto/pathcomp.proto +11 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading src/pathcomp/service/PathCompServiceServicerImpl.py +2 −0 Original line number Diff line number Diff line Loading @@ -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()) Loading src/pathcomp/tests/Objects.py +2 −2 Original line number Diff line number Diff line Loading @@ -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 ----------------------------------------------------------------------------------------------------- Loading Loading
proto/pathcomp.proto +11 −0 Original line number Diff line number Diff line Loading @@ -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 { Loading
src/pathcomp/service/PathCompServiceServicerImpl.py +2 −0 Original line number Diff line number Diff line Loading @@ -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()) Loading
src/pathcomp/tests/Objects.py +2 −2 Original line number Diff line number Diff line Loading @@ -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 ----------------------------------------------------------------------------------------------------- Loading