Commit ea2cafc6 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

NBI - Camara QoD:

- Corrected test scripts
- Corrected connector descriptor
- Deactivated unitary test
parent 5d538c47
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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:
+7 −7
Original line number Diff line number Diff line
@@ -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'
    )
+2 −0
Original line number Diff line number Diff line
@@ -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):