summaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java22
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetAttrImpl.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetFileImpl.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetParamImpl.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceConnection.java4
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailServiceInstanceImpl.java4
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationResourceGroupImpl.java4
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/composition/CompositionDataExtractorImpl.java2
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaElementTypes.java2
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java30
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java2
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/DataModelUtilTest.java2
15 files changed, 54 insertions, 30 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
index 6b03e29348..6649c90adb 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
@@ -630,7 +630,7 @@ public class HeatToToscaUtil {
if (toscaPropertyValue instanceof List && ((List) toscaPropertyValue).get(0) instanceof Map) {
Resource subInterfaceResource = subInterfaceTo.getResource();
Map<String, String> toscaPropertyValueMap = (Map) ((List) toscaPropertyValue).get(0);
- String parentPortPropertyInput = toscaPropertyValueMap.get(ToscaFunctions.GET_INPUT.getDisplayName());
+ String parentPortPropertyInput = toscaPropertyValueMap.get(ToscaFunctions.GET_INPUT.getFunctionName());
Map<String, Object> resourceDefPropertiesMap;
if (!isYamlFile(subInterfaceResource.getType())) {
resourceDefPropertiesMap =
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java
index 69e74542da..77b5520a09 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java
@@ -356,7 +356,7 @@ public class UnifiedCompositionService {
for (String propertyName : exposedVfcInstanceGroupingProperties) {
Map<String, Object> getInputMap = new HashMap<>();
String vfcGroupPropertyInputName = subInterfaceNetworkRole + "_" + propertyName;
- getInputMap.put(GET_INPUT.getDisplayName(), vfcGroupPropertyInputName);
+ getInputMap.put(GET_INPUT.getFunctionName(), vfcGroupPropertyInputName);
properties.put(propertyName, getInputMap);
addInputParameter(vfcGroupPropertyInputName, PropertyType.STRING.getDisplayName(), null,
@@ -1448,9 +1448,9 @@ public class UnifiedCompositionService {
List<List<Object>> getAttrValueList = new ArrayList<>();
if (valueObject instanceof Map) {
- if (((Map) valueObject).containsKey(ToscaFunctions.GET_ATTRIBUTE.getDisplayName())) {
+ if (((Map) valueObject).containsKey(ToscaFunctions.GET_ATTRIBUTE.getFunctionName())) {
getAttrValueList.add(
- (List<Object>) ((Map) valueObject).get(ToscaFunctions.GET_ATTRIBUTE.getDisplayName()));
+ (List<Object>) ((Map) valueObject).get(ToscaFunctions.GET_ATTRIBUTE.getFunctionName()));
}
for (Object key : ((Map) valueObject).keySet()) {
@@ -1468,7 +1468,7 @@ public class UnifiedCompositionService {
private boolean isIncludeToscaFunc(Object valueObject, ToscaFunctions toscaFunction) {
if (valueObject instanceof Map) {
- if (((Map) valueObject).containsKey(toscaFunction.getDisplayName())) {
+ if (((Map) valueObject).containsKey(toscaFunction.getFunctionName())) {
return true;
}
@@ -1620,7 +1620,7 @@ public class UnifiedCompositionService {
List<Object> valueList = new ArrayList<>();
valueList.add(newNodeTemplateId);
valueList.add(getAttrFuncData.getAttributeName());
- parameterValue.put(ToscaFunctions.GET_ATTRIBUTE.getDisplayName(), valueList);
+ parameterValue.put(ToscaFunctions.GET_ATTRIBUTE.getFunctionName(), valueList);
ParameterDefinition outputParameter = new ParameterDefinition();
outputParameter.setValue(parameterValue);
setOutputParameterType(substitutionServiceTemplate, newNodeTemplateId, getAttrFuncData
@@ -1724,7 +1724,7 @@ public class UnifiedCompositionService {
Map<String, Object> indexPropertyValue = new HashMap<>();
Map<String, Object> properties = nodeTemplate.getProperties();
- indexPropertyValue.put(ToscaFunctions.GET_PROPERTY.getDisplayName(),
+ indexPropertyValue.put(ToscaFunctions.GET_PROPERTY.getFunctionName(),
indexValueGetPropertyValue);
properties.put(ToscaConstants.INDEX_VALUE_PROPERTY_NAME,
indexPropertyValue);
@@ -2312,7 +2312,7 @@ public class UnifiedCompositionService {
if (nodeTemplateProperties.containsKey(enrichPropertyName)) {
handleExistingEnrichedProperty(enrichPropertyName, nodeTemplateProperties, inputParamId);
} else {
- propertyValMap.put(ToscaFunctions.GET_INPUT.getDisplayName(), inputParamId);
+ propertyValMap.put(GET_INPUT.getFunctionName(), inputParamId);
nodeTemplate.getProperties().put(enrichPropertyName, propertyValMap);
}
propertyType =
@@ -2331,7 +2331,7 @@ public class UnifiedCompositionService {
Object enrichedProperty = nodeTemplateProperties.get(enrichPropertyName);
if (!isPropertyContainsToscaFunction(enrichedProperty)) {
Map<String, Object> propertyWithGetInput = new HashMap<>();
- propertyWithGetInput.put(ToscaFunctions.GET_INPUT.getDisplayName(), inputParamId);
+ propertyWithGetInput.put(ToscaFunctions.GET_INPUT.getFunctionName(), inputParamId);
nodeTemplateProperties.put(enrichPropertyName, propertyWithGetInput);
}
}
@@ -2476,7 +2476,7 @@ public class UnifiedCompositionService {
case COMPUTE:
inputParamId = COMPUTE_IDENTICAL_VALUE_PROPERTY_PREFIX + propertyId
+ COMPUTE_IDENTICAL_VALUE_PROPERTY_SUFFIX;
- propertyVal.put(ToscaFunctions.GET_INPUT.getDisplayName(), inputParamId);
+ propertyVal.put(ToscaFunctions.GET_INPUT.getFunctionName(), inputParamId);
nodeTemplate.getProperties().put(propertyId, propertyVal);
break;
case PORT:
@@ -2490,7 +2490,7 @@ public class UnifiedCompositionService {
ComputeTemplateConsolidationData computeTemplateConsolidationData =
getConnectedComputeConsolidationData(unifiedCompositionDataList, nodeTemplateId);
inputParamId = getInputParamIdForPort(nodeTemplateId, propertyId, portType, computeTemplateConsolidationData);
- propertyVal.put(ToscaFunctions.GET_INPUT.getDisplayName(), inputParamId);
+ propertyVal.put(ToscaFunctions.GET_INPUT.getFunctionName(), inputParamId);
nodeTemplate.getProperties().put(propertyId, propertyVal);
break;
default:
@@ -2559,7 +2559,7 @@ public class UnifiedCompositionService {
List<String> getInputFuncParams = new ArrayList<>();
getInputFuncParams.add(inputParamId);
getInputFuncParams.add(ToscaConstants.INDEX_VALUE_PROPERTY_NAME);
- propertyVal.put(ToscaFunctions.GET_INPUT.getDisplayName(), getInputFuncParams);
+ propertyVal.put(ToscaFunctions.GET_INPUT.getFunctionName(), getInputFuncParams);
return propertyVal;
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java
index cb6453deed..cabb92c254 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/ContrailTranslationHelper.java
@@ -110,7 +110,7 @@ public class ContrailTranslationHelper {
if (refParameter instanceof Map && ((Map) refParameter).get("Ref") != null) {
Map<String, String> stringWithToken = new HashMap<>();
((Map) stringWithToken)
- .put(ToscaFunctions.GET_INPUT.getDisplayName(), ((Map) refParameter).get("Ref"));
+ .put(ToscaFunctions.GET_INPUT.getFunctionName(), ((Map) refParameter).get("Ref"));
tokenPropertyValue.get("token").add(stringWithToken);
} else if (refParameter instanceof String) {
if (includeBooleanValue) {
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetAttrImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetAttrImpl.java
index 16316f45af..aad57e0d5e 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetAttrImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetAttrImpl.java
@@ -298,7 +298,7 @@ public class FunctionTranslationGetAttrImpl implements FunctionTranslation {
if (functionTranslator.isResourceSupported(attributeFunctionExpression.get(0).toString())
&& functionTranslator.isAttributeSupported(attributeFunctionExpression.get(0).toString())) {
Map<String, Object> getAttrValue = new HashMap<>();
- getAttrValue.put(ToscaFunctions.GET_ATTRIBUTE.getDisplayName(), attributeFunctionExpression);
+ getAttrValue.put(ToscaFunctions.GET_ATTRIBUTE.getFunctionName(), attributeFunctionExpression);
returnValue = getAttrValue;
} else {
returnValue = attributeFunctionExpression;
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetFileImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetFileImpl.java
index 0bf65c0581..b81f8fbe33 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetFileImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetFileImpl.java
@@ -47,7 +47,7 @@ public class FunctionTranslationGetFileImpl implements FunctionTranslation {
Map<String, Object> returnValue = new HashMap<>();
List<String> artifactParameters = new ArrayList<>();
artifactParameters.add(ToscaConstants.MODELABLE_ENTITY_NAME_SELF);
- returnValue.put(ToscaFunctions.GET_ARTIFACT.getDisplayName(), artifactParameters);
+ returnValue.put(ToscaFunctions.GET_ARTIFACT.getFunctionName(), artifactParameters);
artifactParameters.add(artifactId);
ToscaFileOutputService toscaFileOutputService = new ToscaFileOutputServiceCsarImpl();
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetParamImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetParamImpl.java
index b25d33618f..793799e5f0 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetParamImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/functiontranslation/FunctionTranslationGetParamImpl.java
@@ -88,7 +88,7 @@ public class FunctionTranslationGetParamImpl implements FunctionTranslation {
@Override
public Object translateFunction(FunctionTranslator functionTranslator) {
Map<String, Object> returnValue = new HashMap<>();
- returnValue.put(ToscaFunctions.GET_INPUT.getDisplayName(),
+ returnValue.put(ToscaFunctions.GET_INPUT.getFunctionName(),
translateGetParamFunctionExpression(functionTranslator));
return returnValue;
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceConnection.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceConnection.java
index e7449c4105..f3aaf710f8 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceConnection.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceConnection.java
@@ -162,8 +162,8 @@ abstract class BaseResourceConnection<T> {
for (String propertyName : nestedPropertyNames) {
Object propertyValue = mappedNodeTemplate.getProperties().get(propertyName);
if (propertyValue instanceof Map
- && ((Map) propertyValue).containsKey(ToscaFunctions.GET_INPUT.getDisplayName())) {
- Object paramName = ((Map) propertyValue).get(ToscaFunctions.GET_INPUT.getDisplayName());
+ && ((Map) propertyValue).containsKey(ToscaFunctions.GET_INPUT.getFunctionName())) {
+ Object paramName = ((Map) propertyValue).get(ToscaFunctions.GET_INPUT.getFunctionName());
if (paramName instanceof String) {
connectionParameterNameList.add((String) paramName);
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailServiceInstanceImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailServiceInstanceImpl.java
index e147d6262a..305c034470 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailServiceInstanceImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailServiceInstanceImpl.java
@@ -257,7 +257,7 @@ public class ResourceTranslationContrailServiceInstanceImpl extends ResourceTran
List<String> outputGetAttributeList = new ArrayList<>();
outputGetAttributeList.add(nodeTemplateId);
outputGetAttributeList.add(attributeDefinitionEntry.getKey());
- outputValue.put(ToscaFunctions.GET_ATTRIBUTE.getDisplayName(), outputGetAttributeList);
+ outputValue.put(ToscaFunctions.GET_ATTRIBUTE.getFunctionName(), outputGetAttributeList);
nestedSubstitutionServiceTemplateOutputs.put(attributeDefinitionEntry.getKey(),
DataModelUtil.convertAttributeDefToParameterDef(abstractAttributeDef, outputValue));
}
@@ -457,7 +457,7 @@ public class ResourceTranslationContrailServiceInstanceImpl extends ResourceTran
if (contrailComputeProperties != null) {
for (String computePropertyKey : contrailComputeProperties.keySet()) {
Map<String, Object> getInputProperty = new HashMap<>();
- getInputProperty.put(ToscaFunctions.GET_INPUT.getDisplayName(), computePropertyKey);
+ getInputProperty.put(ToscaFunctions.GET_INPUT.getFunctionName(), computePropertyKey);
computeNodeTemplateProperties.put(computePropertyKey, getInputProperty);
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java
index 941a854b15..7dedc6b9cf 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationNeutronSubnetImpl.java
@@ -112,7 +112,7 @@ public class ResourceTranslationNeutronSubnetImpl extends ResourceTranslationBas
if (!(dhcpEnabled instanceof Map)) {
return;
}
- Object dhcpEnabledParameterName = ((Map) dhcpEnabled).get(ToscaFunctions.GET_INPUT.getDisplayName());
+ Object dhcpEnabledParameterName = ((Map) dhcpEnabled).get(ToscaFunctions.GET_INPUT.getFunctionName());
if (dhcpEnabledParameterName == null) {
return;
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationResourceGroupImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationResourceGroupImpl.java
index 9899479088..779550e99d 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationResourceGroupImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationResourceGroupImpl.java
@@ -111,7 +111,7 @@ public class ResourceTranslationResourceGroupImpl extends ResourceTranslationBas
indexVarValList.add(ToscaConstants.MODELABLE_ENTITY_NAME_SELF);
indexVarValList.add(ToscaConstants.SERVICE_TEMPLATE_FILTER_PROPERTY_NAME);
indexVarValList.add(ToscaConstants.INDEX_VALUE_PROPERTY_NAME);
- newIndexVarValue.put(ToscaFunctions.GET_PROPERTY.getDisplayName(), indexVarValList);
+ newIndexVarValue.put(ToscaFunctions.GET_PROPERTY.getFunctionName(), indexVarValList);
return newIndexVarValue;
}
@@ -190,7 +190,7 @@ public class ResourceTranslationResourceGroupImpl extends ResourceTranslationBas
concatList.add(value);
}
- concatMap.put(ToscaFunctions.CONCAT.getDisplayName(), concatList);
+ concatMap.put(ToscaFunctions.CONCAT.getFunctionName(), concatList);
return concatMap;
}
return propertyValue; //no update is needed
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/composition/CompositionDataExtractorImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/composition/CompositionDataExtractorImpl.java
index aded0dfbae..00781c1512 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/composition/CompositionDataExtractorImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/composition/CompositionDataExtractorImpl.java
@@ -427,7 +427,7 @@ public class CompositionDataExtractorImpl implements CompositionDataExtractor {
return Optional.of((Boolean) dhcp);
} else if (dhcp instanceof Map) {
String inputParameterName =
- (String) ((Map) dhcp).get(ToscaFunctions.GET_INPUT.getDisplayName());
+ (String) ((Map) dhcp).get(ToscaFunctions.GET_INPUT.getFunctionName());
if (inputParameterName != null) {
ParameterDefinition inputParameterDefinition =
serviceTemplate.getTopology_template().getInputs().get(inputParameterName);
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaElementTypes.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaElementTypes.java
index 584bf3036f..7aa3e04ad7 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaElementTypes.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaElementTypes.java
@@ -25,7 +25,7 @@ public enum ToscaElementTypes {
NODE_TYPE,
ARTIFACT_TYPE,
DATA_TYPE,
- INTERFCAE_TYPE,
+ INTERFACE_TYPE,
RELATIONSHIP_TYPE,
GROUP_TYPE,
POLICY_TYPE
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java
index 162cef3b51..5dbd05aada 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaFunctions.java
@@ -23,16 +23,40 @@ package org.openecomp.sdc.tosca.datatypes;
import lombok.AllArgsConstructor;
import lombok.Getter;
+/**
+ * TOSCA Simple Profile in YAML Version 1.3.
+ * <p>
+ * OASIS Standard (26 February 2020).
+ * <p>
+ * https://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.3/TOSCA-Simple-Profile-YAML-v1.3.html
+ */
@Getter
@AllArgsConstructor
public enum ToscaFunctions {
+ // Intrinsic functions, section 4.3 in TOSCA 1.3
+ CONCAT("concat"),
+ JOIN("join"), // since 1.2
TOKEN("token"),
+
+ // Property functions, section 4.4 in TOSCA 1.3
+ GET_INPUT("get_input"),
GET_PROPERTY("get_property"),
+
+ // Attribute functions, section 4.5 in TOSCA 1.3
GET_ATTRIBUTE("get_attribute"),
+
+ // Operation functions, section 4.6 in TOSCA 1.3
+ GET_OPERATION_OUTPUT("get_operation_output"),
+
+ // Navigation functions, section 4.7 in TOSCA 1.3
+ GET_NODES_OF_TYPE("get_nodes_of_type"),
+
+ // Artifact functions, section 4.8 in TOSCA 1.3
GET_ARTIFACT("get_artifact"),
- GET_INPUT("get_input"),
- CONCAT("concat");
- private String displayName;
+ // non TOSCA-compliant function
+ GET_POLICY("get_policy");
+
+ private String functionName;
}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
index 5ec67f11db..af55aefc1a 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
@@ -599,7 +599,7 @@ public class DataModelUtil {
Collections.addAll(propertyList, nestedPropertyName);
}
Map<String, Object> getInputProperty = new HashMap<>();
- getInputProperty.put(ToscaFunctions.GET_INPUT.getDisplayName(), propertyList);
+ getInputProperty.put(ToscaFunctions.GET_INPUT.getFunctionName(), propertyList);
return getInputProperty;
}
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/DataModelUtilTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/DataModelUtilTest.java
index 88bcc94d12..fe4a37f39b 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/DataModelUtilTest.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/DataModelUtilTest.java
@@ -496,7 +496,7 @@ public class DataModelUtilTest {
Map inputPropertyMap = DataModelUtil.createGetInputPropertyValueFromListParameter("inputPropertyList", 1,
"nestedPropertyName");
- assertNotNull(inputPropertyMap.get(ToscaFunctions.GET_INPUT.getDisplayName()));
+ assertNotNull(inputPropertyMap.get(ToscaFunctions.GET_INPUT.getFunctionName()));
}
@Test