Simplify VNF Vendor Image extraction 51/83051/1
authormark.j.leonard <mark.j.leonard@gmail.com>
Fri, 22 Mar 2019 14:49:33 +0000 (14:49 +0000)
committermark.j.leonard <mark.j.leonard@gmail.com>
Fri, 22 Mar 2019 15:10:23 +0000 (15:10 +0000)
commit8c6980a4b3bf7ddcff8cc5757c29961385222606
tree29a31ce94503e4a3c7389d413b586d6597648822
parent7deeb1fce8a48a5480c800b49dcfb1827d92a475
Simplify VNF Vendor Image extraction

Refactoring of the software version extraction routines to reduce
complexity.

Pass the NodeTemplates directly to the extractSoftwareVersions() method
and move the exception handling up the calling stack.
Remove the creation/usage of an intermediate Pair object.
Query for the Service VF list once only.
Use Streams rather than converting from Stream to List and back.

This change will simplify future work: either to convert sdc-tosca API
methods (that will be deprecated), or to use an alternative parser.

Change-Id: I745ced9e6095f389ee1bede37e8480dfaf65716a
Issue-ID: AAI-2281
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
src/main/java/org/onap/aai/babel/csar/vnfcatalog/VnfVendorImageExtractor.java
src/test/java/org/onap/aai/babel/csar/vnfcatalog/VnfVendorImageExtractorTest.java