PathComp not passing unitary tests
Reporters
- Lluis Gifre (CTTC)
Description
PathComp not passing unitary tests with error topology[admin](inter) not found
. Seems unitary tests needs to be updated for the changes implemented for interdomain component.
______________________ test_request_service_shortestpath _______________________
pathcomp_client = <pathcomp.frontend.client.PathCompClient.PathCompClient object at 0x7f7fe204eeb0>
def test_request_service_shortestpath(
pathcomp_client : PathCompClient): # pylint: disable=redefined-outer-name
request_services = copy.deepcopy(SERVICES)
#request_services[0]['service_constraints'] = [
# json_constraint_custom('bandwidth[gbps]', 1000.0),
# json_constraint_custom('latency[ms]', 1200.0),
#]
pathcomp_request = PathCompRequest(services=request_services)
pathcomp_request.shortest_path.Clear() # hack to select the shortest path algorithm that has no attributes
> pathcomp_reply = pathcomp_client.Compute(pathcomp_request)
pathcomp/frontend/tests/test_unitary.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
common/tools/client/RetryDecorator.py:75: in wrapper
return func(self, *args, **kwargs)
pathcomp/frontend/client/PathCompClient.py:51: in Compute
response = self.stub.Compute(request)
/usr/local/lib/python3.9/site-packages/grpc/_channel.py:946: in __call__
return _end_unary_response_blocking(state, call, False, None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <grpc._channel._RPCState object at 0x7f7fe2076070>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f7fe2070f80>
with_call = False, deadline = None
def _end_unary_response_blocking(state, call, with_call, deadline):
if state.code is grpc.StatusCode.OK:
if with_call:
rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
return state.response, rendezvous
else:
return state.response
else:
> raise _InactiveRpcError(state)
E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.INTERNAL
E details = "<_InactiveRpcError of RPC that terminated with:
E status = StatusCode.NOT_FOUND
E details = "topology[admin](inter) not found"
E debug_error_string = "{"created":"@1669214830.083751853","description":"Error received from peer ipv4:127.0.0.1:10000","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"topology[admin](inter) not found","grpc_status":5}"
E >"
E debug_error_string = "{"created":"@1669214830.085486626","description":"Error received from peer ipv4:127.0.0.1:20020","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"<_InactiveRpcError of RPC that terminated with:\n\tstatus = StatusCode.NOT_FOUND\n\tdetails = "topology[admin](inter) not found"\n\tdebug_error_string = "{"created":"@1669214830.083751853","description":"Error received from peer ipv4:127.0.0.1:10000","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"topology[admin](inter) not found","grpc_status":5}"\n>","grpc_status":13}"
E >
/usr/local/lib/python3.9/site-packages/grpc/_channel.py:849: _InactiveRpcError
------------------------------ Captured log setup ------------------------------
INFO pathcomp.frontend.service.PathCompService:GenericGrpcService.py:44 Starting Service (tentative endpoint: 0.0.0.0:20020, max_workers: 10)...
INFO pathcomp.frontend.service.PathCompService:GenericGrpcService.py:59 Listening on 0.0.0.0:20020...
------------------------------ Captured log call -------------------------------
INFO pathcomp.frontend.service.PathCompServiceServicerImpl:PathCompServiceServicerImpl.py:44 [Compute] begin ; request = {"services": [{"service_config": {"config_rules": []}, "service_constraints": [{"custom": {"constraint_type": "bandwidth[gbps]", "constraint_value": "10.0"}}, {"custom": {"constraint_type": "latency[ms]", "constraint_value": "20.0"}}], "service_endpoint_ids": [{"device_id": {"device_uuid": {"uuid": "DC1-GW"}}, "endpoint_uuid": {"uuid": "int"}}, {"device_id": {"device_uuid": {"uuid": "DC2-GW"}}, "endpoint_uuid": {"uuid": "int"}}], "service_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "svc:DC1-GW/int==DC2-GW/int"}}, "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_type": "SERVICETYPE_L3NM"}], "shortest_path": {}}
INFO common.tests.MockServicerImpl_Context:MockServicerImpl_Context.py:142 [GetTopology] request={"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "inter"}}
ERROR pathcomp.frontend.service.PathCompServiceServicerImpl:Decorator.py:78 Compute exception
Traceback (most recent call last):
File "/var/teraflow/common/rpc_method_wrapper/Decorator.py", line 67, in inner_wrapper
reply = func(self, request, grpc_context)
File "/var/teraflow/pathcomp/frontend/service/PathCompServiceServicerImpl.py", line 48, in Compute
if (len(request.services) == 1) and is_inter_domain(context_client, request.services[0].service_endpoint_ids):
File "/var/teraflow/common/tools/context_queries/InterDomain.py", line 84, in is_inter_domain
interdomain_device_uuids = get_interdomain_device_uuids(context_client)
File "/var/teraflow/common/tools/context_queries/InterDomain.py", line 64, in get_interdomain_device_uuids
interdomain_topology = context_client.GetTopology(interdomain_topology_id)
File "/var/teraflow/common/tools/client/RetryDecorator.py", line 75, in wrapper
return func(self, *args, **kwargs)
File "/var/teraflow/context/client/ContextClient.py", line 116, in GetTopology
response = self.stub.GetTopology(request)
File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 946, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/usr/local/lib/python3.9/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.NOT_FOUND
details = "topology[admin](inter) not found"
debug_error_string = "{"created":"@1669214830.083751853","description":"Error received from peer ipv4:127.0.0.1:10000","file":"src/core/lib/surface/call.cc","file_line":966,"grpc_message":"topology[admin](inter) not found","grpc_status":5}"