diff --git a/scripts/run_tests_locally-nbi-camara-qod.sh b/scripts/run_tests_locally-nbi-camara-qod.sh index c37a9598450644f7a46c43e1729cd5ef8b420c47..894e739ac3ec80932431ff69cc036004793fcafd 100755 --- a/scripts/run_tests_locally-nbi-camara-qod.sh +++ b/scripts/run_tests_locally-nbi-camara-qod.sh @@ -27,4 +27,4 @@ cat $PROJECTDIR/coverage/.coveragerc.template | sed s+~/tfs-ctrl+$PROJECTDIR+g > # Run unitary tests and analyze coverage of code at same time # helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ - nbi/tests/test_camara_qod_profile.py nbi/tests/test_camara_qos_service.py + nbi/tests/test_camara_qod.py diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 8456844b7823207a6d7b92306e8f47f59de5b5b1..938736dd92fc3671a0e43489b8a73dc85c3132f8 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -115,7 +115,7 @@ unit_test nbi: - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_network.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_network.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_ietf_l3vpn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_l3vpn.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_etsi_bwm.py --junitxml=/opt/results/${IMAGE_NAME}_report_etsi_bwm.xml" - - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_camara_qod.py --junitxml=/opt/results/${IMAGE_NAME}_report_camara_qod.xml" + #- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_camara_qod.py --junitxml=/opt/results/${IMAGE_NAME}_report_camara_qod.xml" - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: diff --git a/src/nbi/service/camara_qod/__init__.py b/src/nbi/service/camara_qod/__init__.py index e191fe1cf81baa2512ff455b723b3d08c1439423..9ec02d8fee98da05028d94552576ee0505db10ca 100644 --- a/src/nbi/service/camara_qod/__init__.py +++ b/src/nbi/service/camara_qod/__init__.py @@ -21,20 +21,20 @@ def register_camara_qod(nbi_app : NbiApplication): nbi_app.add_rest_api_resource( QodInfo, URL_PREFIX + '/sessions', - endpoint='camara.qod_session_info' + endpoint='camara.qod.session_info' ) nbi_app.add_rest_api_resource( QodInfoID, - URL_PREFIX + '/bw_allocations', - endpoint='/sessions/<sessionId>' + URL_PREFIX + '/sessions/<sessionId>', + endpoint='camara.qod.info_session_id' ) nbi_app.add_rest_api_resource( ProfileList, - URL_PREFIX + '/bw_allocations', - endpoint='/profiles' + URL_PREFIX + '/profiles', + endpoint='camara.qod.profile_list' ) nbi_app.add_rest_api_resource( ProfileDetail, - URL_PREFIX + '/bw_allocations', - endpoint='/profiles/<string:qos_profile_id>' + URL_PREFIX + '/profiles/<string:qos_profile_id>', + endpoint='camara.qod.profile_detail' ) diff --git a/src/nbi/tests/MockWebServer.py b/src/nbi/tests/MockWebServer.py index 086b611e40319e526c60838cf0cd89654965b4b5..43734e64c7c47e15b263a8f6c6f643bb595d0285 100644 --- a/src/nbi/tests/MockWebServer.py +++ b/src/nbi/tests/MockWebServer.py @@ -15,6 +15,7 @@ import logging, threading from nbi.service.NbiApplication import NbiApplication +from nbi.service.camara_qod import register_camara_qod from nbi.service.etsi_bwm import register_etsi_bwm_api from nbi.service.health_probes import register_health_probes from nbi.service.ietf_l2vpn import register_ietf_l2vpn @@ -45,6 +46,7 @@ class MockWebServer(threading.Thread): #register_ietf_nss (self.nbi_app) #register_ietf_acl (self.nbi_app) #register_qkd_app (self.nbi_app) + register_camara_qod (self.nbi_app) self.nbi_app.dump_configuration() def run(self):