From aea64ba99fa9c9b51112b30aeb0872c4cdb89759 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Wed, 18 Aug 2021 14:34:33 +0100 Subject: Validate the Resource Model before importing VSP Validates the Resource Model selected during the Import VSP. This model must be aligned with one of the models that the imported VSP relates to. Fix VSP package retrieval to get the exact version from the VSP chosen during the Import VSP process. Introduces a client in the Catalog to retrieve from the Onboarding backend a VSP information using its Id and version Id. Change-Id: Ic8fb52b6daadc0e7203c81a9c15c3e46d5b9fffb Issue-ID: SDC-3675 Signed-off-by: andre.schmid --- .../vendorsoftwareproduct/errors/PackageNotFoundErrorBuilder.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src') diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/errors/PackageNotFoundErrorBuilder.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/errors/PackageNotFoundErrorBuilder.java index ef80e4d8db..c23a9d512d 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/errors/PackageNotFoundErrorBuilder.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/errors/PackageNotFoundErrorBuilder.java @@ -41,6 +41,12 @@ public class PackageNotFoundErrorBuilder { builder.withMessage(String.format(PACKAGE_VERSION_NOT_FOUND_MSG, vendorSoftwareProductId, version == null ? null : version.toString())); } + public PackageNotFoundErrorBuilder(String vendorSoftwareProductId, String version) { + builder.withId(VendorSoftwareProductErrorCodes.PACKAGE_NOT_FOUND); + builder.withCategory(ErrorCategory.APPLICATION); + builder.withMessage(String.format(PACKAGE_VERSION_NOT_FOUND_MSG, vendorSoftwareProductId, version)); + } + /** * Instantiates a new Package not found error builder. * -- cgit 1.2.3-korg