package org.openecomp.sdc.be.components.merge.instance;
-import java.util.List;
-import java.util.Map;
-
+import fj.data.Either;
import org.openecomp.sdc.be.components.impl.ArtifactsBusinessLogic;
import org.openecomp.sdc.be.components.merge.heat.HeatEnvArtifactsMergeBusinessLogic;
import org.openecomp.sdc.be.impl.ComponentsUtils;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import fj.data.Either;
+import java.util.List;
+import java.util.Map;
/**
* Created by chaya on 9/20/2017.
@org.springframework.stereotype.Component("ComponentInstanceHeatEnvMerge")
public class ComponentInstanceHeatEnvMerge implements ComponentInstanceMergeInterface {
- private static Logger log = LoggerFactory.getLogger(ComponentInstanceHeatEnvMerge.class.getName());
+ private static final Logger log = LoggerFactory.getLogger(ComponentInstanceHeatEnvMerge.class);
@Autowired
private ArtifactsBusinessLogic artifactsBusinessLogic;
Map<String, Object> json = artifactsBusinessLogic.buildJsonForUpdateArtifact(artifactInfo, ArtifactGroupTypeEnum.DEPLOYMENT, null);
Either<Either<ArtifactDefinition, Operation>, ResponseFormat> uploadArtifactToService = artifactsBusinessLogic.updateResourceInstanceArtifactNoContent(newInstanceId, updatedContainerComponent, user, json,
- artifactsBusinessLogic.new ArtifactOperationInfo(false, false, ArtifactsBusinessLogic.ArtifactOperationEnum.Update), null);
+ artifactsBusinessLogic.new ArtifactOperationInfo(false, false, ArtifactsBusinessLogic.ArtifactOperationEnum.UPDATE), null);
if (uploadArtifactToService.isRight()) {
log.error("Failed to update artifact {} on resourceInstance {}", artifactInfo.getArtifactLabel(), newInstanceId);
return Either.right(uploadArtifactToService.right().value());