diff options
author | vasraz <vasyl.razinkov@est.tech> | 2022-11-25 12:48:58 +0000 |
---|---|---|
committer | Vasyl Razinkov <vasyl.razinkov@est.tech> | 2022-11-25 12:51:37 +0000 |
commit | 630e46ef816ea2d16d358ed3fab0d9ebed884c19 (patch) | |
tree | be58e61d4fd5d0cae30ea65e3f53c339043b6ba7 /catalog-model/src/main/java | |
parent | 5e71c18416adc5c136ea9053a6bbac819da18c60 (diff) |
Fix issues while importing a Service
The import service was ignoring the selected model for imported nodes.
It was also trying to set a different icon for resources that already
exist in the database, creating a validation error.
There was also a nullpointer in relation to not found capability.
Change-Id: Ifa9320c5554bbf5e8fed0cc2e2dea6b05503d213
Issue-ID: SDC-4266
Signed-off-by: André Schmid <andre.schmid@est.tech>
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Diffstat (limited to 'catalog-model/src/main/java')
2 files changed, 2 insertions, 2 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/DefaultUploadResourceInfo.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/DefaultUploadResourceInfo.java index 3b8a6cd9e8..e9174cb6de 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/DefaultUploadResourceInfo.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/DefaultUploadResourceInfo.java @@ -25,7 +25,7 @@ import java.util.List; import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.category.SubCategoryDefinition; -public class DefaultUploadResourceInfo extends UploadResourceInfo{ +public class DefaultUploadResourceInfo extends UploadResourceInfo { public DefaultUploadResourceInfo(String toscaName){ SubCategoryDefinition subCategory = new SubCategoryDefinition(); diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/CapabilityTypeOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/CapabilityTypeOperation.java index ff4dc0aabd..983c43677d 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/CapabilityTypeOperation.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/CapabilityTypeOperation.java @@ -85,7 +85,7 @@ public class CapabilityTypeOperation extends AbstractOperation implements ICapab if (validationRes.isRight()) { log.error("#addCapabilityType - One or all properties of capability type {} not valid. status is {}", capabilityTypeDefinition, validationRes.right().value()); - return result; + return validationRes; } Either<CapabilityTypeData, StorageOperationStatus> eitherStatus = addCapabilityTypeToGraph(capabilityTypeDefinition); result = eitherStatus.left().map(CapabilityTypeData::getUniqueId).left().bind(uniqueId -> getCapabilityType(uniqueId, inTransaction)); |