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 --- .../resources/config/catalog-be/configuration.yaml | 1 - .../config/catalog-be/error-configuration.yaml | 26 ++++++++++++++++++++++ .../src/test/resources/paths/path-context.xml | 1 + 3 files changed, 27 insertions(+), 1 deletion(-) (limited to 'catalog-be/src/test/resources') diff --git a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml index 78d3722806..4692342722 100644 --- a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml +++ b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml @@ -346,7 +346,6 @@ onboarding: protocol: http host: localhost port: 8080 - downloadCsarUri: "/onboarding-api/v1.0/vendor-software-products/packages" healthCheckUri: "/onboarding-api/v1.0/healthcheck" ecompPortal: diff --git a/catalog-be/src/test/resources/config/catalog-be/error-configuration.yaml b/catalog-be/src/test/resources/config/catalog-be/error-configuration.yaml index b363bacd73..aeab3018b8 100644 --- a/catalog-be/src/test/resources/config/catalog-be/error-configuration.yaml +++ b/catalog-be/src/test/resources/config/catalog-be/error-configuration.yaml @@ -2293,4 +2293,30 @@ errors: code: 500, message: "An unexpected error occurred while updating the capability '%1'.", messageId: "SVC4143" + } + #-----------SVC4154--------------------------- + # %1 - "VSP id" + # %2 - "VSP version id" + VSP_FIND_ERROR: { + code: 500, + message: "An error has occurred while retrieving the Vendor Software Product of id '%1', version id '%2'", + messageId: "SVC4154" + } + + #-----------SVC4155--------------------------- + # %1 - "VSP id" + # %2 - "VSP version id" + VSP_NOT_FOUND: { + code: 404, + message: "Could not find Vendor Software Product of id '%1', version id '%2'", + messageId: "SVC4155" + } + + #-----------SVC4156--------------------------- + # %1 - "The model name" + # %2 - "List of allowed models" + VSP_MODEL_NOT_ALLOWED: { + code: 400, + message: "The Model '%1' is not allowed for the imported Vendor Software Product. Allowed Models: '%2'", + messageId: "SVC4156" } \ No newline at end of file diff --git a/catalog-be/src/test/resources/paths/path-context.xml b/catalog-be/src/test/resources/paths/path-context.xml index 7994b0c44d..f6306d0f67 100644 --- a/catalog-be/src/test/resources/paths/path-context.xml +++ b/catalog-be/src/test/resources/paths/path-context.xml @@ -50,6 +50,7 @@ Modifications copyright (c) 2018 Nokia org.openecomp.sdc.be.components.validation, org.openecomp.sdc.be.switchover.detector, org.openecomp.sdc.be.tosca, + org.openecomp.sdc.be.client, org.openecomp.sdc.be.model.operations.impl, org.openecomp.sdc.be.model.jsonjanusgraph.operations, org.openecomp.sdc.be.model.jsonjanusgraph.utils, -- cgit 1.2.3-korg