diff options
author | Lincoln Lavoie <lylavoie@iol.unh.edu> | 2020-02-06 13:41:17 -0500 |
---|---|---|
committer | Lincoln Lavoie <lylavoie@iol.unh.edu> | 2020-02-11 21:32:00 -0500 |
commit | 8418b797d249ad06c127cb55be49113f4288e1ba (patch) | |
tree | 1cccb99e4af6386bb8065c3e50775e0d72367be4 | |
parent | baf5f4550b5f6142ee25d527ed5fc79fe926211a (diff) |
Updated portal for OVP 2019.12 releaseovp-3.0.1
* Fixed errors for VNF results
* Cleaned up couple of other errors
* Added TOSCA test case requirements.
* Fixed typos and white space issues.
* Corrected flake8 and weblint failures
Signed-off-by: Lincoln Lavoie <lylavoie@iol.unh.edu>
Change-Id: I911f294725c353d1388f44f79814cadc31e21574
6 files changed, 128 insertions, 30 deletions
diff --git a/3rd_party/static/onap-ui/components/home/home.html b/3rd_party/static/onap-ui/components/home/home.html index ca58b0a..b96df92 100644 --- a/3rd_party/static/onap-ui/components/home/home.html +++ b/3rd_party/static/onap-ui/components/home/home.html @@ -14,45 +14,39 @@ <div class="panel panel-default"> <div class="panel-heading"> <div class="panel-title"> - <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo"> - Release 2018.11 + <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"> + Release 2019.12 </a> </div> </div> - <div id="collapseTwo" class="panel-collapse collapse"> + <div id="collapseOne" class="panel-collapse collapse"> <div class="panel-body"> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/userguide/vnf_test_guide.html" - target="_blank" rel="noopener">OVP / Dovetail User Guide + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/testing/user/userguide/vnf_test_guide.html" + target="_blank" rel="noopener">OVP VNF User Guide <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> </div> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/userguide/cli_reference.html" - target="_blank" rel="noopener">Dovetail CLI - <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> - </a> - </div> - <div> - <a href="https://wiki.onap.org/display/DW/ONAP+Modeling+specification" + <a href="https://docs.onap.org/en/elalto/submodules/vnfrqts/testcases.git/docs/index.html" target="_blank" rel="noopener">Test Specifications <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> </div> <div> - <a href="https://wiki.onap.org/display/DW/Release+Calendar" + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/release/release-notes/index.html" target="_blank" rel="noopener">Release Notes <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> </div> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/reviewerguide/index.html" + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/testing/user/reviewerguide/index.html" target="_blank" rel="noopener">Reviewer Guide <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> </div> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/ovpaddendum/index.html" + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/testing/user/ovpaddendum/index.html" target="_blank" rel="noopener">Guidelines Addendum <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> diff --git a/3rd_party/static/onap-ui/components/results-report/data/2019.12/heat-testcases.json b/3rd_party/static/onap-ui/components/results-report/data/2019.12/heat-testcases.json new file mode 100644 index 0000000..03d2090 --- /dev/null +++ b/3rd_party/static/onap-ui/components/results-report/data/2019.12/heat-testcases.json @@ -0,0 +1,26 @@ +{ + "mandatory": { + "onap-vvp.validate.heat": { + "cases": [ + "onap-vvp.validate.heat" + ], + "total": 1 + }, + "onap-vvp.lifecycle_validate.heat": { + "cases": [ + "model-and-distribute", + "instantiation" + ], + "total": 2 + }, + "stack_validation": { + "cases": [ + "stack_validation" + ], + "total": 1 + } + }, + "optional": { + + } +}
\ No newline at end of file diff --git a/3rd_party/static/onap-ui/components/results-report/data/2019.12/tosca-testcases.json b/3rd_party/static/onap-ui/components/results-report/data/2019.12/tosca-testcases.json new file mode 100644 index 0000000..3a0f068 --- /dev/null +++ b/3rd_party/static/onap-ui/components/results-report/data/2019.12/tosca-testcases.json @@ -0,0 +1,51 @@ +{ + "mandatory": { + "onap-dublin__vnf-validation__vnf-tosca-provision__onap-dublin": { + "cases": [ + "onap-dublin__sdc.onboarding__vsp-add-artifact__onap-dublin", + "onap-dublin__aai__cloud-list__onap-dublin", + "onap-dublin__aai__cloud-create__onap-dublin", + "onap-dublin__vnf-validation__vnf-tosca-provision__onap-dublin", + "onap-dublin__sdc.onboarding__vsp-package__onap-dublin", + "onap-dublin__sdc.onboarding__vsp-create__onap-dublin", + "onap-dublin__sdc.catalog__service-model-test-accept__onap-dublin", + "onap-dublin__aai__service-type-list__onap-dublin", + "onap-dublin__aai__vnfm-list__onap-dublin", + "onap-dublin__aai__complex-create__onap-dublin", + "onap-dublin__sdc.catalog__service-model-test-request__onap-dublin", + "onap-dublin__aai__vnfm-create__onap-dublin", + "onap-dublin__aai__subscription-list__onap-dublin", + "onap-dublin__sdc.catalog__service-model-distribute__onap-dublin", + "onap-dublin__sdc.catalog__service-model-test-start__onap-dublin", + "onap-dublin__sdc.catalog__vf-model-certify__onap-dublin", + "onap-dublin__sdc.onboarding__vlm-key-group-create__onap-dublin", + "onap-dublin__sdc.onboarding__vlm-entitlement-pool-create__onap-dublin", + "onap-dublin__sdc.catalog__vf-model-create__onap-dublin", + "onap-dublin__sdc.onboarding__vlm-aggreement-create__onap-dublin", + "onap-dublin__sdc.catalog__service-model-set-property__onap-dublin", + "onap-dublin__aai__complex-list__onap-dublin", + "onap-dublin__aai__customer-list__onap-dublin", + "onap-dublin__aai__tenant-list__onap-dublin", + "onap-dublin__sdc.onboarding__vlm-feature-group-create__onap-dublin", + "onap-dublin__aai__subscription-create__onap-dublin", + "onap-dublin__sdc.catalog__service-model-create__onap-dublin", + "onap-dublin__sdc.catalog__service-model-add-artifact__onap-dublin", + "onap-dublin__sdc.onboarding__vsp-validate__onap-dublin", + "onap-dublin__sdc.onboarding__vlm-create__onap-dublin", + "onap-dublin__sdc.onboarding__vlm-submit__onap-dublin", + "onap-dublin__aai__complex-associate__onap-dublin", + "onap-dublin__aai__tenant-create__onap-dublin", + "onap-dublin__sdc.catalog__service-model-approve__onap-dublin", + "onap-dublin__aai__service-type-create__onap-dublin", + "onap-dublin__aai__customer-create__onap-dublin", + "onap-dublin__sdc.onboarding__vsp-submit__onap-dublin", + "onap-dublin__sdc.catalog__service-model-add-vf__onap-dublin", + "onap-dublin__sdc.catalog__vf-model-add-artifact__onap-dublin" + ], + "total": 39 + } + }, + "optional": { + + } +}
\ No newline at end of file diff --git a/3rd_party/static/testapi-ui/components/home/home.html b/3rd_party/static/testapi-ui/components/home/home.html index 1cc7248..f372a75 100644 --- a/3rd_party/static/testapi-ui/components/home/home.html +++ b/3rd_party/static/testapi-ui/components/home/home.html @@ -22,37 +22,37 @@ <div id="collapseOne" class="panel-collapse collapse"> <div class="panel-body"> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/userguide/testing_guide.html" + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/testing/user/userguide/testing_guide.html" target="_blank" rel="noopener">OVP / Dovetail User Guide <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> </div> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/userguide/cli_reference.html" + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/testing/user/userguide/cli_reference.html" target="_blank" rel="noopener">Dovetail CLI <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> </div> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/testspecification/index.html" + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/testing/user/testspecification/index.html" target="_blank" rel="noopener">Test Specifications <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> </div> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/release/release-notes/index.html" + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/release/release-notes/index.html" target="_blank" rel="noopener">Release Notes <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> </div> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/reviewerguide/index.html" + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/testing/user/reviewerguide/index.html" target="_blank" rel="noopener">Reviewer Guide <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> </div> <div> - <a href="https://opnfv-dovetail.readthedocs.io/en/latest/testing/user/ovpaddendum/index.html" + <a href="https://opnfv-dovetail.readthedocs.io/en/stable-hunter/testing/user/ovpaddendum/index.html" target="_blank" rel="noopener">Guidelines Addendum <span class="glyphicon glyphicon-new-window" aria-hidden="true"></span> </a> diff --git a/opnfv_testapi/resources/result_handlers.py b/opnfv_testapi/resources/result_handlers.py index 9501bfd..d914696 100644 --- a/opnfv_testapi/resources/result_handlers.py +++ b/opnfv_testapi/resources/result_handlers.py @@ -12,6 +12,8 @@ from datetime import timedelta import json import tarfile import io +import re +import uuid from tornado import gen from tornado import web @@ -266,20 +268,26 @@ class ResultsUploadHandler(ResultsCLHandler): self.finish_request({'code': 403, 'msg': msg}) return try: - results = tar_in.extractfile('results/results.json').read() + # Deal with results that are in the 'root' of the tar + # file, instead of in results/ + missing_results_dir = '' + tar_files = tar_in.getnames() + if 'results/results.json' not in tar_files: + missing_results_dir = '/results' + results = tar_in.extractfile('results.json').read() + else: + results = tar_in.extractfile('results/results.json').read() except KeyError: msg = 'Uploaded results must contain at least one passing test.' self.finish_request({'code': 403, 'msg': msg}) return - results = results.split('\n') + # results = results.split('\n') result_ids = [] version = '' vnf_type = None vnf_checksum = None - for result in results: - if result == '': - continue - self.json_args = json.loads(result).copy() + try: + self.json_args = json.loads(results).copy() openid = self.get_secure_cookie(auth_const.OPENID) if openid: self.json_args['owner'] = openid @@ -297,8 +305,24 @@ class ResultsUploadHandler(ResultsCLHandler): build_tag = self.json_args['build_tag'] _id = yield self._inner_create() result_ids.append(str(_id)) - test_id = build_tag[13:49] - log_path = '/home/testapi/logs/%s' % (test_id) + except ValueError: + msg = 'Uploaded results don''t appear to contain a '\ + 'valid results.json file!' + self.finish_request({'code': 403, 'msg': msg}) + return + # Build a test id from the build_tag, where this field takes a couple + # of different formats between Dovetail NFVI testing and VNF testing. + # If a valid UUID isn't part of the build_tag, we will generate one + # here. + test_id_match = re.search('[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-' + '[0-9A-F]{4}-[0-9A-F]{12}', build_tag) + if not test_id_match: + print('test_id doesn''t look to be a valid UUID, generating a ' + 'new one...') + test_id = str(uuid.uuid4()) + else: + test_id = test_id_match.group(1) + log_path = '/home/testapi/logs/%s%s' % (test_id, missing_results_dir) tar_in.extractall(log_path) log_filename = "/home/testapi/logs/log_%s.tar.gz" % (test_id) with open(log_filename, "wb") as tar_out: diff --git a/opnfv_testapi/resources/review_handlers.py b/opnfv_testapi/resources/review_handlers.py index 9731e0f..c42d33e 100644 --- a/opnfv_testapi/resources/review_handlers.py +++ b/opnfv_testapi/resources/review_handlers.py @@ -72,7 +72,10 @@ class ReviewsCLHandler(GenericReviewHandler): raises.Forbidden(message.unauthorized()) role = self.get_secure_cookie(auth_const.ROLE) if 'reviewer' not in role.split(','): - raises.Unauthorized(message.no_auth()) + self.finish_request({'code': 403, + 'msg': 'You do not have the reviewer ' + 'permision / role!'}) + return test = yield dbapi.db_find_one( 'tests', {'id': self.json_args['test_id']}) if test['owner'] == self.json_args['reviewer_openid']: |