diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index 7725cb5017dee7af7c5261e995723a62774e7d98..4fcbb81d02395d131e9a2d0de5752ebf11dcbd10 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -39,7 +39,7 @@ spec: #- containerPort: 9192 env: - name: LOG_LEVEL - value: "INFO" + value: "DEBUG" - name: FLASK_ENV value: "production" # change to "development" if developing - name: IETF_NETWORK_RENDERER diff --git a/src/nbi/service/app.py b/src/nbi/service/app.py index c615584b53e72976385c72a8cbfd6597395db7de..94a267bc68a9435854382777073bf8d4471bf7ed 100644 --- a/src/nbi/service/app.py +++ b/src/nbi/service/app.py @@ -55,9 +55,7 @@ wait_for_environment_variables([ get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), ]) -BIND_ADDRESS = get_http_bind_address() -BIND_PORT = get_service_port_http(ServiceNameEnum.NBI) -BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' +BASE_URL = get_service_baseurl_http(ServiceNameEnum.NBI) or '' nbi_app = NbiApplication(base_url=BASE_URL) register_health_probes(nbi_app) @@ -79,6 +77,8 @@ app = nbi_app.get_flask_app() if __name__ == '__main__': # Only used to run it locally during development stage; # otherwise, app is directly launched by gunicorn. + BIND_ADDRESS = get_http_bind_address() + BIND_PORT = get_service_port_http(ServiceNameEnum.NBI) nbi_app._sio.run( app, host=BIND_ADDRESS, port=BIND_PORT, debug=True, use_reloader=False diff --git a/src/tests/ofc22/tests/test_functional_create_service.py b/src/tests/ofc22/tests/test_functional_create_service.py index e0874a22d274117fcd557337180f2253125cb4a4..143f662f130d3cd5330f425863206b393b5cb656 100644 --- a/src/tests/ofc22/tests/test_functional_create_service.py +++ b/src/tests/ofc22/tests/test_functional_create_service.py @@ -78,6 +78,7 @@ def test_scenario_kpi_values_created( We short k KPI descriptors to test. """ response = monitoring_client.GetKpiDescriptorList(Empty()) + assert len(response.kpi_descriptor_list) >= 2 kpi_descriptors = random.choices(response.kpi_descriptor_list, k=2) for kpi_descriptor in kpi_descriptors: