aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/BaseOperation.java2
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java2
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverter.java18
-rw-r--r--catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ResourceInstanceOperationTest.java2
4 files changed, 10 insertions, 14 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/BaseOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/BaseOperation.java
index 407d711ed1..d29f989149 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/BaseOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsontitan/operations/BaseOperation.java
@@ -1350,7 +1350,7 @@ public abstract class BaseOperation {
}
protected String buildGroupInstanceName(String instanceName, String groupName) {
- return ValidationUtils.normaliseComponentName(instanceName) + ".." + groupName;
+ return ValidationUtils.normalizeComponentInstanceName(instanceName) + ".." + groupName;
}
protected String generateCustomizationUUID() {
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
index bd57689700..d282ecfae9 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
@@ -878,7 +878,7 @@ public class GroupInstanceOperation extends AbstractOperation implements IGroupI
}
private String buildGroupInstanceLogicalName(String instanceName, String groupName) {
- return instanceName + ".." + groupName;
+ return ValidationUtils.normalizeComponentInstanceName(instanceName) + ".." + groupName;
}
/**
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverter.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverter.java
index d8198dac6b..f3189ee968 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverter.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/converters/ToscaListValueConverter.java
@@ -109,19 +109,15 @@ public class ToscaListValueConverter extends ToscaValueBaseConverter implements
asJsonArray.forEach(e -> {
Object convertedValue = null;
if (isScalarF) {
- String jsonAsString = e.toString();
- log.debug("try to convert scalar value {}", jsonAsString);
- if ( jsonAsString == null) {
- convertedValue = null;
+ if (e.isJsonPrimitive()) {
+ String jsonAsString = e.getAsString();
+ log.debug("try to convert scalar value {}", jsonAsString);
+ convertedValue = innerConverterFinal.convertToToscaValue(jsonAsString, innerType,
+ dataTypes);
} else {
- JsonElement singleElement = jsonParser.parse(jsonAsString);
- if (singleElement.isJsonPrimitive()) {
- convertedValue = innerConverterFinal.convertToToscaValue(jsonAsString, innerType,
- dataTypes);
- } else {
- convertedValue = handleComplexJsonValue(singleElement);
- }
+ convertedValue = handleComplexJsonValue(e);
}
+
} else {
JsonObject asJsonObject = e.getAsJsonObject();
Set<Entry<String, JsonElement>> entrySet = asJsonObject.entrySet();
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ResourceInstanceOperationTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ResourceInstanceOperationTest.java
index 4f9488c239..e631f6ca42 100644
--- a/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ResourceInstanceOperationTest.java
+++ b/catalog-model/src/test/java/org/openecomp/sdc/be/model/operations/impl/ResourceInstanceOperationTest.java
@@ -421,7 +421,7 @@ public class ResourceInstanceOperationTest extends ModelTestBase {
resourceInstance.setComponentUid(respurceUid);
resourceInstance.setCreationTime(System.currentTimeMillis());
resourceInstance.setModificationTime(System.currentTimeMillis());
- resourceInstance.setNormalizedName(normaliseComponentName(name));
+ resourceInstance.setNormalizedName(normaliseComponentInstanceName(name));
// Map<String, RequirementInstance> requirements = new HashMap<String,
// RequirementInstance>();