aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComputeManagerImpl.java19
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ImageManagerImpl.java10
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java7
3 files changed, 4 insertions, 32 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComputeManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComputeManagerImpl.java
index 6e462dc370..7f69baea9a 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComputeManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ComputeManagerImpl.java
@@ -32,7 +32,6 @@ import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComputeEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.DeploymentFlavorEntity;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
-import org.openecomp.sdc.vendorsoftwareproduct.errors.DuplicateComputeInComponentErrorBuilder;
import org.openecomp.sdc.vendorsoftwareproduct.errors.NotSupportedHeatOnboardMethodErrorBuilder;
import org.openecomp.sdc.vendorsoftwareproduct.errors.VendorSoftwareProductErrorCodes;
import org.openecomp.sdc.vendorsoftwareproduct.services.schemagenerator.SchemaGenerator;
@@ -194,14 +193,10 @@ public class ComputeManagerImpl implements ComputeManager {
compute.getId());
boolean manual = vspInfoDao.isManual(compute.getVspId(), compute.getVersion());
- if (!manual) {
- validateHeatVspComputeUpdate("Name",
- compute.getComputeCompositionData().getName(),
- retrieved.getComputeCompositionData().getName());
- }
ComputeCompositionSchemaInput schemaInput = new ComputeCompositionSchemaInput();
- schemaInput.setCompute(compute.getComputeCompositionData());
+ schemaInput.setManual(manual);
+ schemaInput.setCompute(retrieved.getComputeCompositionData());
CompositionEntityValidationData validationData = compositionEntityDataManager
.validateEntity(compute, SchemaTemplateContext.composition, schemaInput);
@@ -214,16 +209,6 @@ public class ComputeManagerImpl implements ComputeManager {
return validationData;
}
- private void validateHeatVspComputeUpdate(String name, String value, String retrivedValue) {
-
- if (value != null && !value.equals(retrivedValue)) {
-
- final ErrorCode updateHeatComputeErrorBuilder =
- DuplicateComputeInComponentErrorBuilder.getComputeHeatReadOnlyErrorBuilder(name);
- throw new CoreException(updateHeatComputeErrorBuilder);
- }
- }
-
private ComputeEntity getComputeEntity(String vspId, Version version, String componentId,
String computeId) {
ComputeEntity computeEntity =
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ImageManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ImageManagerImpl.java
index 6451768119..66f9e97d04 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ImageManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ImageManagerImpl.java
@@ -146,13 +146,6 @@ public class ImageManagerImpl implements ImageManager {
getImageEntity(image.getVspId(), image.getVersion(), image.getComponentId(),
image.getId());
- if (!isManual) {
- final Image imageCompositionData = image.getImageCompositionData();
- final String fileName = imageCompositionData.getFileName();
- validateHeatVspImageUpdate("fileName", fileName, retrieved.getImageCompositionData()
- .getFileName());
- }
-
Collection<ImageEntity> vfcImageList = listImages(image.getVspId(),
image.getVersion(), image.getComponentId());
@@ -162,7 +155,8 @@ public class ImageManagerImpl implements ImageManager {
ImageCompositionSchemaInput schemaInput = new ImageCompositionSchemaInput();
- schemaInput.setImage(image.getImageCompositionData());
+ schemaInput.setManual(isManual);
+ schemaInput.setImage(retrieved.getImageCompositionData());
CompositionEntityValidationData validationData = compositionEntityDataManager
.validateEntity(image, SchemaTemplateContext.composition, schemaInput);
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java
index a4fa6be1d8..24bf8dbe61 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImpl.java
@@ -207,13 +207,6 @@ public class NicManagerImpl implements NicManager {
schemaInput.setManual(vspInfoDao.isManual(nic.getVspId(), nic.getVersion()));
schemaInput.setNic(retrieved.getNicCompositionData());
- if (schemaInput.isManual() && !nic.getNicCompositionData().getName()
- .matches(VendorSoftwareProductConstants.NAME_PATTERN)) {
- ErrorCode errorCode = NicErrorBuilder
- .getNicNameFormatErrorBuilder(VendorSoftwareProductConstants.NAME_PATTERN);
- throw new CoreException(errorCode);
- }
-
CompositionEntityValidationData validationData = compositionEntityDataManager
.validateEntity(nic, SchemaTemplateContext.composition, schemaInput);
if (CollectionUtils.isEmpty(validationData.getErrors())) {