summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
a3c8fc0)
Add additional condition to check name metadata for correct selection of metadata.json artifact by Acumos adapter
Issue-ID: DCAEGEN2-2578
Signed-off-by: shabs2020 <shabnam.sultana@highstreet-technologies.com>
Change-Id: I76aacd854d1f6c7dff08321e9ecfd030172c07bd
Signed-off-by: shabs2020 <shabnam.sultana@highstreet-technologies.com>
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
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
## [1.0.3] - 7/28/2020
* Fetch json schemas during image build
## [1.0.2] - 3/26/2020
def _md_json_matcher(art):
""" Is this artifact the metadata.json file? """
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 onboard(aa, callback, solution, revid):
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))
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))
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.dcaegen2.platform.adapter</groupId>
<artifactId>dcaegen2-platform-adapter-acumos</artifactId>
<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>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.sources>.</sonar.sources>