diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2021-01-08 20:41:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-01-08 20:41:58 +0000 |
commit | 9013e3e60092977d0ad8ae6dbac79b88964fb952 (patch) | |
tree | f6ee4990821d60d2fa353a6d8359bfe420f584c0 /adapter/acumos | |
parent | 88286a3487c3ec955cc6207be2e70318634ebbd9 (diff) | |
parent | aeabc22ba7e3befc9c19286418c136189b76db37 (diff) |
Merge "Modify metadata matcher"
Diffstat (limited to 'adapter/acumos')
-rw-r--r-- | adapter/acumos/Changelog.md | 3 | ||||
-rw-r--r-- | adapter/acumos/aoconversion/scanner.py | 3 | ||||
-rw-r--r-- | adapter/acumos/pom.xml | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/adapter/acumos/Changelog.md b/adapter/acumos/Changelog.md index 71e5520..73570fd 100644 --- a/adapter/acumos/Changelog.md +++ b/adapter/acumos/Changelog.md @@ -3,7 +3,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). - +## [1.0.4] - 1/07/2021 + * Select metadata.json with additional name search in case of multiple json artifacts (Fix for DCAEGEN2-2578) ## [1.0.3] - 7/28/2020 * Fetch json schemas during image build ## [1.0.2] - 3/26/2020 diff --git a/adapter/acumos/aoconversion/scanner.py b/adapter/acumos/aoconversion/scanner.py index aecf760..cefcc3d 100644 --- a/adapter/acumos/aoconversion/scanner.py +++ b/adapter/acumos/aoconversion/scanner.py @@ -116,7 +116,7 @@ def _x_zip_matcher(art): def _md_json_matcher(art): """ Is this artifact the metadata.json file? """ - return art['name'].endswith('.json') + return art['name'].__contains__('metadata') & art['name'].endswith('.json') def _walk(config): @@ -136,6 +136,7 @@ def _walk(config): def onboard(aa, callback, solution, revid): + xrev = aa.jsonget('/solutions/{}/revisions/{}', solution['solutionId'], revid) callback(model_name=solution['name'], model_version=xrev['version'], model_last_updated=xrev['modified'], rating=solution['ratingAverageTenths'] / 10.0, proto_getter=aa.artgetter(xrev, _x_proto_matcher), zip_getter=aa.artgetter(xrev, _x_zip_matcher), metadata_getter=aa.artgetter(xrev, _md_json_matcher)) diff --git a/adapter/acumos/pom.xml b/adapter/acumos/pom.xml index 20883cf..eda0620 100644 --- a/adapter/acumos/pom.xml +++ b/adapter/acumos/pom.xml @@ -23,7 +23,7 @@ limitations under the License. <modelVersion>4.0.0</modelVersion> <groupId>org.onap.dcaegen2.platform.adapter</groupId> <artifactId>dcaegen2-platform-adapter-acumos</artifactId> - <version>1.0.3-SNAPSHOT</version> + <version>1.0.4-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <sonar.sources>.</sonar.sources> |