aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2021-01-18 17:53:43 +0000
committerChristophe Closset <christophe.closset@intl.att.com>2021-01-20 10:35:09 +0000
commit502142a7334ec31add9a72c239f260893f3022cb (patch)
treefac88d889805ea72c4fb81fccdbf4a71740195fe /catalog-be
parent5ce2da3100483eb505876b428c7c490ff445ba5c (diff)
Fix import of services containing artifacts
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3437 Change-Id: Ib5402c38c1f2bffa906cef3a36bfdaf5b4d9cf8e
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/CsarArtifactsAndGroupsBusinessLogic.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/CsarArtifactsAndGroupsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/CsarArtifactsAndGroupsBusinessLogic.java
index 5be54a3c88..6bde6ba771 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/CsarArtifactsAndGroupsBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/CsarArtifactsAndGroupsBusinessLogic.java
@@ -1002,7 +1002,7 @@ public class CsarArtifactsAndGroupsBusinessLogic extends BaseBusinessLogic {
}
public Either<Either<ArtifactDefinition, Operation>, ResponseFormat> createOrUpdateCsarArtifactFromJson(
- Component resource, User user, Map<String, Object> json, ArtifactOperationInfo operation) {
+ Component component, User user, Map<String, Object> json, ArtifactOperationInfo operation) {
String jsonStr = gson.toJson(json);
ArtifactDefinition artifactDefinitionFromJson = RepresentationUtils.convertJsonToArtifactDefinition(jsonStr,
@@ -1011,9 +1011,9 @@ public class CsarArtifactsAndGroupsBusinessLogic extends BaseBusinessLogic {
Either<ArtifactDefinition, Operation> result;
try {
result = artifactsBusinessLogic.handleLoadedArtifact(
- resource, user, operation, false, true, ComponentTypeEnum.RESOURCE, artifactDefinitionFromJson);
+ component, user, operation, false, true, component.getComponentType(), artifactDefinitionFromJson);
} catch (ComponentException e) {
- log.debug(FAILED_UPLOAD_ARTIFACT_TO_COMPONENT, ComponentTypeEnum.RESOURCE, resource.getName());
+ log.debug(FAILED_UPLOAD_ARTIFACT_TO_COMPONENT, component.getComponentType(), component.getName());
return Either.right(componentsUtils.getResponseFormat(e));
} catch (Exception e) {
ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.GENERAL_ERROR);