From 838c368551e086ef14936b86e58d7148a131c4f5 Mon Sep 17 00:00:00 2001 From: talig Date: Wed, 24 Oct 2018 16:57:45 +0300 Subject: Validate vlm is not draft during vsp submit If vlm version is used - make sure it is Certified, otherwise - make sure the vlm contains at least one Certified version Change-Id: Iacb28d622f334d7d81d3e56991e5a2540ed7bcc3 Issue-ID: SDC-1843 Signed-off-by: talig --- .../sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java index 36e076083f..582bf473d7 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java @@ -497,7 +497,9 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts { String user) throws IOException { VspDetails vspDetails = vendorSoftwareProductManager.getVsp(vspId, version); - vspDetails.setVlmVersion(versioningManager.get(vspDetails.getVendorId(),vspDetails.getVlmVersion())); + if (vspDetails.getVlmVersion() != null) { + vspDetails.setVlmVersion(versioningManager.get(vspDetails.getVendorId(), vspDetails.getVlmVersion())); + } ValidationResponse validationResponse = vendorSoftwareProductManager.validate(vspDetails); Map> compilationErrors = vendorSoftwareProductManager.compile(vspId, version); -- cgit 1.2.3-korg