package org.openecomp.sdc.be.model.heat;
-import org.openecomp.sdc.be.model.tosca.converters.*;
-import org.openecomp.sdc.be.model.tosca.validators.*;
-
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import org.openecomp.sdc.be.model.tosca.converters.HeatBooleanConverter;
+import org.openecomp.sdc.be.model.tosca.converters.HeatCommaDelimitedListConverter;
+import org.openecomp.sdc.be.model.tosca.converters.HeatJsonConverter;
+import org.openecomp.sdc.be.model.tosca.converters.HeatNumberConverter;
+import org.openecomp.sdc.be.model.tosca.converters.HeatStringConverter;
+import org.openecomp.sdc.be.model.tosca.converters.PropertyValueConverter;
+import org.openecomp.sdc.be.model.tosca.validators.HeatBooleanValidator;
+import org.openecomp.sdc.be.model.tosca.validators.HeatCommaDelimitedListValidator;
+import org.openecomp.sdc.be.model.tosca.validators.HeatNumberValidator;
+import org.openecomp.sdc.be.model.tosca.validators.HeatStringValidator;
+import org.openecomp.sdc.be.model.tosca.validators.PropertyTypeValidator;
+
+
+@AllArgsConstructor
+@Getter
public enum HeatParameterType {
STRING("string", HeatStringValidator.getInstance(), HeatStringConverter.getInstance()),
private PropertyTypeValidator validator;
private PropertyValueConverter converter;
- HeatParameterType(String type, PropertyTypeValidator validator, PropertyValueConverter converter) {
- this.type = type;
- this.validator = validator;
- this.converter = converter;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public PropertyTypeValidator getValidator() {
- return validator;
- }
-
- public void setValidator(PropertyTypeValidator validator) {
- this.validator = validator;
- }
-
- public PropertyValueConverter getConverter() {
- return converter;
- }
-
- public void setConverter(PropertyValueConverter converter) {
- this.converter = converter;
- }
-
- public static HeatParameterType isValidType(String typeName) {
+ public static HeatParameterType isValidType(final String typeName) {
if (typeName == null) {
return null;
}
- for (HeatParameterType type : HeatParameterType.values()) {
+ for (final HeatParameterType type : HeatParameterType.values()) {
if (type.getType().equals(typeName)) {
return type;
}
package org.openecomp.sdc.be.model.tosca.converters;
+import org.onap.sdc.tosca.datatypes.model.ScalarUnitValidator;
import org.openecomp.sdc.be.model.DataTypeDefinition;
import java.math.BigDecimal;
return numberConverter;
}
+ private final ScalarUnitValidator scalarUnitValidator = ScalarUnitValidator.getInstance();
+
+
private HeatNumberConverter() {
}
@Override
public String convert(String original, String innerType, Map<String, DataTypeDefinition> dataTypes) {
-
if (original == null || original.isEmpty()) {
return null;
}
+ if (scalarUnitValidator.isScalarUnit(original)) {
+ return original;
+ }
+
return new BigDecimal(original).toPlainString();
}
package org.openecomp.sdc.be.model.tosca.validators;
-import org.openecomp.sdc.be.model.DataTypeDefinition;
-
import java.util.Map;
+import org.onap.sdc.tosca.datatypes.model.ScalarUnitValidator;
+import org.openecomp.sdc.be.model.DataTypeDefinition;
public class HeatNumberValidator implements PropertyTypeValidator {
private static HeatNumberValidator numberValidator = new HeatNumberValidator();
- private static FloatValidator floatValidator = FloatValidator.getInstance();
- private static IntegerValidator integerValidator = IntegerValidator.getInstance();
+ private final FloatValidator floatValidator = FloatValidator.getInstance();
+ private final IntegerValidator integerValidator = IntegerValidator.getInstance();
+ private final ScalarUnitValidator scalarUnitValidator = ScalarUnitValidator.getInstance();
public static HeatNumberValidator getInstance() {
return numberValidator;
}
private HeatNumberValidator() {
-
}
@Override
- public boolean isValid(String value, String innerType, Map<String, DataTypeDefinition> allDataTypes) {
+ public boolean isValid(final String value,
+ final String innerType,
+ final Map<String, DataTypeDefinition> allDataTypes) {
if (value == null || value.isEmpty()) {
return true;
valid = floatValidator.isValid(value, null, allDataTypes);
}
+ if(!valid) {
+ valid = scalarUnitValidator.isScalarUnit(value);
+ }
+
return valid;
}
@Override
- public boolean isValid(String value, String innerType) {
+ public boolean isValid(final String value, final String innerType) {
return isValid(value, innerType, null);
}
}
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>${lang3.version}</version>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>com.google.code.bean-matchers</groupId>
<artifactId>bean-matchers</artifactId>
*/
package org.onap.sdc.tosca.datatypes.model;
-import java.util.*;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
public enum PropertyType {
STRING("string"),
MAP("map"),
LIST("list"),
SCALAR_UNIT_SIZE("scalar-unit.size"),
+ SCALAR_UNIT_TIME("scalar-unit.time"),
SCALAR_UNIT_FREQUENCY("scalar-unit.frequency");
- private static final Map<String, PropertyType> M_MAP =
- Collections.unmodifiableMap(initializeMapping());
- private static final Set<String> SIMPLE_PROPERTY_TYPES =
- Collections.unmodifiableSet(initializeSimplePropertyTypes());
+ private static final Map<String, PropertyType> M_MAP = Collections.unmodifiableMap(initializeMapping());
+ private static final Set<String> SIMPLE_PROPERTY_TYPES = Collections.unmodifiableSet(initializeSimplePropertyTypes());
private String displayName;
- PropertyType(String displayName) {
-
- this.displayName = displayName;
- }
-
/**
* Initilize property type display name mapping.
* @return Map
*/
public static Map<String, PropertyType> initializeMapping() {
- Map<String, PropertyType> typeMap = new HashMap<>();
- for (PropertyType v : PropertyType.values()) {
- typeMap.put(v.displayName, v);
+ final Map<String, PropertyType> typeMap = new HashMap<>();
+ for (final PropertyType propertyType : PropertyType.values()) {
+ typeMap.put(propertyType.displayName, propertyType);
}
return typeMap;
}
* @param displayName
* @return PropertyType
*/
- public static PropertyType getPropertyTypeByDisplayName(String displayName) {
+ public static PropertyType getPropertyTypeByDisplayName(final String displayName) {
if (M_MAP.containsKey(displayName)) {
return M_MAP.get(displayName);
}
}
private static Set<String> initializeSimplePropertyTypes() {
- final int setSize = 4;
- Set<String> simplePropertyTypes = new HashSet<>(setSize);
+ final Set<String> simplePropertyTypes = new HashSet<>();
simplePropertyTypes.add(STRING.getDisplayName().toLowerCase());
simplePropertyTypes.add(INTEGER.getDisplayName().toLowerCase());
simplePropertyTypes.add(FLOAT.getDisplayName().toLowerCase());
simplePropertyTypes.add(BOOLEAN.getDisplayName().toLowerCase());
+ simplePropertyTypes.add(SCALAR_UNIT_SIZE.getDisplayName().toLowerCase());
+ simplePropertyTypes.add(SCALAR_UNIT_TIME.getDisplayName().toLowerCase());
+ simplePropertyTypes.add(SCALAR_UNIT_FREQUENCY.getDisplayName().toLowerCase());
return simplePropertyTypes;
}
return SIMPLE_PROPERTY_TYPES;
}
- public String getDisplayName() {
- return displayName;
- }
-
}
--- /dev/null
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.sdc.tosca.datatypes.model;
+
+import java.util.Arrays;
+import java.util.regex.Pattern;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * This Class is responsible for validating if a given value is a valid Tosca Scalar Unit Type.
+ */
+public class ScalarUnitValidator {
+
+ private static ScalarUnitValidator scalarUnitValidator = new ScalarUnitValidator();
+
+ /**
+ * Tosca Scalar Unit Types structure.
+ */
+ private final Pattern pattern = Pattern.compile("\\d+\\s*[a-zA-Z]{1,3}");
+
+ private ScalarUnitValidator() {
+ }
+
+ public static ScalarUnitValidator getInstance() {
+ return scalarUnitValidator;
+ }
+
+ /**
+ * Validates if the given String matches with the Tosca Scalar Unit Types structure.
+ *
+ * @param value String to be validated.
+ * @return an {@Boolean}
+ */
+ public boolean isScalarUnit(final String value) {
+ if (value == null || value.isEmpty()) {
+ return true;
+ }
+
+ return pattern.matcher(value).matches();
+ }
+
+ /**
+ * Validates if the given String has a Recognized Tosca unit.
+ *
+ * @param value String to be validated
+ * @param enumClass Enum that represents a Tosca Scalar Unit Type.
+ * @param <E>
+ * @return an Enum that represents the Tosca Scalar Unit Type.
+ */
+ public <E extends Enum<E>> boolean isValueScalarUnit(final Object value, final Class<E> enumClass) {
+ final String stringToValidate = String.valueOf(value);
+ return isScalarUnit(stringToValidate) && Arrays.stream(StringUtils.split(stringToValidate))
+ .anyMatch(strValue -> Arrays.stream(enumClass.getEnumConstants())
+ .anyMatch(scalarUnit ->
+ scalarUnit.name().equalsIgnoreCase(strValue) || strValue.endsWith(scalarUnit.name())));
+ }
+}
import java.util.List;
import java.util.Map;
import java.util.Objects;
-
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.lang3.ClassUtils;
+import org.onap.sdc.tosca.datatypes.model.ScalarUnitValidator;
+@AllArgsConstructor
+@Getter
public enum DefinedHeatParameterTypes {
NUMBER("number"),
STRING("string"),
JSON("json"),
BOOLEAN("boolean");
+ private static ScalarUnitValidator scalarUnitValidator = ScalarUnitValidator.getInstance();
private static Map<String, DefinedHeatParameterTypes> stringToDefinedType;
static {
stringToDefinedType = new HashMap<>();
- for (DefinedHeatParameterTypes definedHeatParameterType : DefinedHeatParameterTypes.values()) {
+ for (final DefinedHeatParameterTypes definedHeatParameterType : DefinedHeatParameterTypes.values()) {
stringToDefinedType.put(definedHeatParameterType.type, definedHeatParameterType);
}
}
private String type;
- DefinedHeatParameterTypes(String type) {
- this.type = type;
- }
-
- public static DefinedHeatParameterTypes findByHeatResource(String type) {
+ public static DefinedHeatParameterTypes findByHeatResource(final String type) {
return stringToDefinedType.get(type);
}
* @param parameterType the parameter type
* @return the boolean
*/
- public static boolean isValueIsFromGivenType(Object value, String parameterType) {
- DefinedHeatParameterTypes definedType = findByHeatResource(parameterType);
+ public static boolean isValueIsFromGivenType(final Object value, final String parameterType) {
+ final DefinedHeatParameterTypes definedType = findByHeatResource(parameterType);
if (Objects.nonNull(definedType)) {
switch (definedType) {
case NUMBER:
+ if (scalarUnitValidator.isValueScalarUnit(value, ToscaScalarUnitSize.class) ||
+ scalarUnitValidator.isValueScalarUnit(value, ToscaScalarUnitTime.class) ||
+ scalarUnitValidator.isValueScalarUnit(value, ToscaScalarUnitFrequency.class)) {
+ return isValueString(value);
+ }
return NumberUtils.isNumber(String.valueOf(value));
case BOOLEAN:
return false;
}
- public static boolean isNovaServerEnvValueIsFromRightType(Object value) {
+ public static boolean isNovaServerEnvValueIsFromRightType(final Object value) {
return isValueIsFromGivenType(value, COMMA_DELIMITED_LIST.getType())
|| isValueIsFromGivenType(value, STRING.getType());
}
- private static boolean isValueCommaDelimitedList(Object value) {
+ private static boolean isValueCommaDelimitedList(final Object value) {
return value instanceof List
|| String.valueOf(value).contains(",")
|| isValueIsFromGivenType(value, DefinedHeatParameterTypes.STRING.type);
}
- private static boolean isValueString(Object value) {
+ private static boolean isValueString(final Object value) {
return value instanceof String
|| ClassUtils.isPrimitiveOrWrapper(value.getClass());
}
- private static boolean isValueJson(Object value) {
+ private static boolean isValueJson(final Object value) {
return (value instanceof Map) || (value instanceof List);
}
- public static boolean isEmptyValueInEnv(Object value) {
+ public static boolean isEmptyValueInEnv(final Object value) {
return Objects.isNull(value);
}
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
}
--- /dev/null
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes;
+
+/**
+ * This enum is responsible for defining properties that have scalar values measured in units per second.
+ */
+public enum ToscaScalarUnitFrequency {
+
+ HZ, KHZ, MHZ, GHZ
+
+}
--- /dev/null
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes;
+
+/**
+ * This enum is responsible for defining properties that have scalar values measured in size units.
+ */
+public enum ToscaScalarUnitSize {
+
+ B, KB, KIB, MB, MIB, GB, GIB, TB, TIB
+
+}
--- /dev/null
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes;
+
+
+/**
+ * This enum is responsible for defining properties that have scalar values measured in size units.
+ */
+public enum ToscaScalarUnitTime {
+
+ D, H, M, S, MS, US, NS
+
+}
--- /dev/null
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * This enum is responsible for defining all Tosca Scalar Unit types Supported.
+ */
+@Getter
+@AllArgsConstructor
+public enum ToscaScalarUnitTypes {
+
+ SCALAR_UNIT_SIZE("scalar-unit.size"),
+ SCALAR_UNIT_TIME("scalar-unit.time"),
+ SCALAR_UNIT_FREQUENCY("scalar-unit.frequency");
+
+ private String type;
+}
--- /dev/null
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdc.heat.datatypes.model;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.sdc.tosca.datatypes.model.ScalarUnitValidator;
+import org.openecomp.sdc.heat.datatypes.DefinedHeatParameterTypes;
+import org.openecomp.sdc.heat.datatypes.ToscaScalarUnitFrequency;
+import org.openecomp.sdc.heat.datatypes.ToscaScalarUnitSize;
+import org.openecomp.sdc.heat.datatypes.ToscaScalarUnitTime;
+
+public class ToscaScalarUnitTypesTest {
+
+ private String inputValue;
+ private static ScalarUnitValidator scalarUnitValidator = ScalarUnitValidator.getInstance();
+
+ @Test
+ public void shouldReturnTrueForScalarUnitSize() {
+ inputValue = "100 " + ToscaScalarUnitSize.GB.name();
+ Assert.assertTrue(DefinedHeatParameterTypes.isValueIsFromGivenType(inputValue,
+ DefinedHeatParameterTypes.NUMBER.getType()));
+
+ Assert.assertTrue(scalarUnitValidator.isValueScalarUnit(inputValue, ToscaScalarUnitSize.class));
+ }
+
+ @Test
+ public void shouldReturnTrueForScalarUnitSizeWithSpace() {
+ inputValue = "10 " + ToscaScalarUnitSize.GB.name();
+ Assert.assertTrue(DefinedHeatParameterTypes.isValueIsFromGivenType(inputValue,
+ DefinedHeatParameterTypes.NUMBER.getType()));
+
+ Assert.assertTrue(scalarUnitValidator.isValueScalarUnit(inputValue, ToscaScalarUnitSize.class));
+ }
+
+ @Test
+ public void shouldReturnTrueForScalarUnitSizeWithoutSpace() {
+ inputValue = "200" + ToscaScalarUnitSize.GB.name();
+ Assert.assertTrue(DefinedHeatParameterTypes.isValueIsFromGivenType(inputValue,
+ DefinedHeatParameterTypes.NUMBER.getType()));
+
+ Assert.assertTrue(scalarUnitValidator.isValueScalarUnit(inputValue, ToscaScalarUnitSize.class));
+ }
+
+ @Test
+ public void shouldReturnTrueForScalarUnitTime() {
+ inputValue = "5000 " + ToscaScalarUnitTime.S.name();
+ Assert.assertTrue(DefinedHeatParameterTypes.isValueIsFromGivenType(
+ inputValue, DefinedHeatParameterTypes.NUMBER.getType()));
+
+ Assert.assertTrue(scalarUnitValidator.isValueScalarUnit(inputValue, ToscaScalarUnitTime.class));
+ }
+
+ @Test
+ public void shouldReturnTrueForScalarUnitFrequency() {
+ inputValue = "60 " + ToscaScalarUnitFrequency.GHZ.name();
+ Assert.assertTrue(DefinedHeatParameterTypes.isValueIsFromGivenType(
+ inputValue, DefinedHeatParameterTypes.NUMBER.getType()));
+
+ Assert.assertTrue(scalarUnitValidator.isValueScalarUnit(inputValue, ToscaScalarUnitFrequency.class));
+ }
+
+ @Test
+ public void shouldReturnFalse() {
+ inputValue = "one hundred " + ToscaScalarUnitSize.GB.name();
+ Assert.assertFalse(DefinedHeatParameterTypes.isValueIsFromGivenType(
+ inputValue, DefinedHeatParameterTypes.NUMBER.getType()));
+
+ Assert.assertFalse(scalarUnitValidator.isValueScalarUnit(inputValue, ToscaScalarUnitSize.class));
+ }
+
+ @Test
+ public void shouldReturnFalseForMatcher() {
+ inputValue = "100 abc";
+ Assert.assertFalse(DefinedHeatParameterTypes.isValueIsFromGivenType(
+ inputValue, DefinedHeatParameterTypes.NUMBER.getType()));
+
+ Assert.assertFalse(scalarUnitValidator.isValueScalarUnit(inputValue, ToscaScalarUnitSize.class));
+ }
+
+}
return;
}
+ final Environment heatEnvFile = getHeatEnvFile(heatFileData, context);
+ final Map<String, Object> parameters = heatEnvFile.getParameters();
Map<String, ParameterDefinition> parameterDefinitionMap =
TranslatorHeatToToscaParameterConverter
.parameterConverter(serviceTemplate, heatOrchestrationTemplate.getParameters(),
- heatOrchestrationTemplate, heatFileName, heatFileData.getParentFile(), context);
- Environment heatEnvFile = getHeatEnvFile(heatFileData, context);
- Map<String, Object> parameters = heatEnvFile.getParameters();
+ heatOrchestrationTemplate, heatFileName, heatFileData.getParentFile(), context, parameters);
Object parameterValue;
if (parameters != null) {
for (Map.Entry<String, ParameterDefinition> entry : parameterDefinitionMap.entrySet()) {
package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation;
+import java.util.Map;
import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.heat.datatypes.HeatBoolean;
import org.openecomp.sdc.heat.services.HeatConstants;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
-import java.util.Map;
-
public class ResourceTranslationCinderVolumeImpl extends ResourceTranslationBase {
private static final String VOLUME_SIZE_PROPERTY_NAME = "size";
@Override
- public void translate(TranslateTo translateTo) {
- NodeTemplate nodeTemplate = new NodeTemplate();
+ public void translate(final TranslateTo translateTo) {
+ final NodeTemplate nodeTemplate = new NodeTemplate();
nodeTemplate.setType(ToscaNodeType.CINDER_VOLUME);
nodeTemplate.setProperties(TranslatorHeatToToscaPropertyConverter
.getToscaPropertiesSimpleConversion(translateTo.getServiceTemplate(),
translateTo.getHeatOrchestrationTemplate(), translateTo.getResource().getType(),
nodeTemplate, translateTo.getContext()));
handleSizeProperty(nodeTemplate.getProperties());
- String toscaReadOnlyPropName =
+ final String toscaReadOnlyPropName =
HeatToToscaUtil.getToscaPropertyName(translateTo, HeatConstants.READ_ONLY_PROPERTY_NAME);
- Object readOnlyPropVal = nodeTemplate.getProperties().get(toscaReadOnlyPropName);
+ final Object readOnlyPropVal = nodeTemplate.getProperties().get(toscaReadOnlyPropName);
if (readOnlyPropVal != null && !(readOnlyPropVal instanceof Map)) {
nodeTemplate.getProperties().put(toscaReadOnlyPropName, HeatBoolean.eval(readOnlyPropVal));
}
}
- private void handleSizeProperty(Map<String, Object> nodeTemplateProperties) {
- Object size = nodeTemplateProperties.get(VOLUME_SIZE_PROPERTY_NAME);
+ private void handleSizeProperty(final Map<String, Object> nodeTemplateProperties) {
+ final Object size = nodeTemplateProperties.get(VOLUME_SIZE_PROPERTY_NAME);
if (size == null) {
return;
}
- if (size instanceof Map) {
- Map<String, Object> propMap = (Map) size;
- Map.Entry<String, Object> entry = propMap.entrySet().iterator().next();
- String val = "(" + entry.getKey() + " : " + entry.getValue() + ") * 1024";
- nodeTemplateProperties.put(VOLUME_SIZE_PROPERTY_NAME, val);
- } else {
- nodeTemplateProperties.put(VOLUME_SIZE_PROPERTY_NAME, size + "*1024");
- }
+ nodeTemplateProperties.put(VOLUME_SIZE_PROPERTY_NAME, size);
}
}
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Optional;
-
import org.apache.commons.collections4.MapUtils;
-import org.onap.sdc.tosca.datatypes.model.*;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.sdc.tosca.datatypes.model.Constraint;
+import org.onap.sdc.tosca.datatypes.model.EntrySchema;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.ScalarUnitValidator;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.onap.sdc.tosca.datatypes.model.heatextend.AnnotationDefinition;
import org.onap.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
import org.openecomp.core.utilities.file.FileUtils;
-
+import org.openecomp.sdc.heat.datatypes.DefinedHeatParameterTypes;
+import org.openecomp.sdc.heat.datatypes.ToscaScalarUnitFrequency;
+import org.openecomp.sdc.heat.datatypes.ToscaScalarUnitSize;
+import org.openecomp.sdc.heat.datatypes.ToscaScalarUnitTime;
+import org.openecomp.sdc.heat.datatypes.ToscaScalarUnitTypes;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
import org.openecomp.sdc.heat.datatypes.model.Output;
import org.openecomp.sdc.heat.datatypes.model.Parameter;
* @return the map
*/
public static Map<String, ParameterDefinition> parameterConverter(ServiceTemplate serviceTemplate,
- Map<String, Parameter> parameters, HeatOrchestrationTemplate heatOrchestrationTemplate,
- String heatFileName, String parentHeatFileName, TranslationContext context) {
+ Map<String, Parameter> parameters,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String heatFileName, String parentHeatFileName,
+ TranslationContext context,
+ Map<String, Object> heatEnvParameters) {
Map<String, ParameterDefinition> parameterDefinitionMap = new HashMap<>();
for (Map.Entry<String, Parameter> entry : parameters.entrySet()) {
String heatParamName = entry.getKey();
parameterDefinitionMap.put(heatParamName,
- getToscaParameter(serviceTemplate,heatParamName, entry.getValue(),
- heatOrchestrationTemplate,
- heatFileName, parentHeatFileName, context));
+ getToscaParameter(serviceTemplate,heatParamName, entry.getValue(), heatOrchestrationTemplate, heatFileName,
+ parentHeatFileName, context, heatEnvParameters));
}
return parameterDefinitionMap;
}
* @param context the context
* @return the map
*/
- public static Map<String, ParameterDefinition> parameterOutputConverter(ServiceTemplate
- serviceTemplate,
- Map<String, Output> parameters, HeatOrchestrationTemplate heatOrchestrationTemplate,
+ public static Map<String, ParameterDefinition> parameterOutputConverter(ServiceTemplate serviceTemplate,
+ Map<String, Output> parameters,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
String heatFileName, TranslationContext context) {
Map<String, ParameterDefinition> parameterDefinitionMap = new HashMap<>();
for (Map.Entry<String, Output> entry : parameters.entrySet()) {
* @return the tosca parameter
*/
private static ParameterDefinitionExt getToscaParameter(ServiceTemplate serviceTemplate,
- String heatParameterName,
- Parameter heatParameter,
- HeatOrchestrationTemplate
- heatOrchestrationTemplate,
- String heatFileName,
- String parentHeatFileName,
- TranslationContext context) {
+ String heatParameterName,
+ Parameter heatParameter,
+ HeatOrchestrationTemplate heatOrchestrationTemplate,
+ String heatFileName,
+ String parentHeatFileName,
+ TranslationContext context,
+ Map<String, Object> heatEnvParameters) {
ParameterDefinitionExt toscaParameter = new ParameterDefinitionExt();
- toscaParameter.setType(getToscaParameterType(heatParameter.getType()));
+ toscaParameter.setType(getToscaParameterType(heatParameter.getType(), heatEnvParameters));
toscaParameter.setEntry_schema(getToscaParameterEntrySchema(toscaParameter.getType()));
toscaParameter.setLabel(heatParameter.getLabel());
toscaParameter.setDescription(heatParameter.getDescription());
return entrySchema;
}
- protected static String getToscaParameterType(String heatParameterType) {
+ protected static String getToscaParameterType(final String heatParameterType,
+ final Map<String, Object> heatEnvParameters) {
+ if (heatEnvParameters != null && DefinedHeatParameterTypes.NUMBER.getType().equals(heatParameterType)) {
+ if (getScalarUnitType(heatEnvParameters, ToscaScalarUnitSize.class) != null) {
+ return ToscaScalarUnitTypes.SCALAR_UNIT_SIZE.getType();
+ } else if (getScalarUnitType(heatEnvParameters, ToscaScalarUnitTime.class) != null) {
+ return ToscaScalarUnitTypes.SCALAR_UNIT_TIME.getType();
+ } else if (getScalarUnitType(heatEnvParameters, ToscaScalarUnitFrequency.class) != null) {
+ return ToscaScalarUnitTypes.SCALAR_UNIT_FREQUENCY.getType();
+ }
+ }
+
return parameterTypeMapping.get(heatParameterType);
}
+
+ private static <E extends Enum<E>> String getScalarUnitType(final Map<String, Object> heatEnvParameters,
+ final Class<E> enumClass) {
+ final ScalarUnitValidator scalarUnitValidator = ScalarUnitValidator.getInstance();
+ if (Arrays.stream(enumClass.getEnumConstants()).anyMatch(unitType ->
+ heatEnvParameters.values().stream().filter(Objects::nonNull)
+ .anyMatch(parameterValue -> scalarUnitValidator.isScalarUnit(parameterValue.toString()) &&
+ Arrays.stream(StringUtils.split(parameterValue.toString()))
+ .anyMatch(strParamValue -> strParamValue.equalsIgnoreCase(unitType.name()))))) {
+ return enumClass.getTypeName();
+ }
+ return null;
+ }
+
}
- availability_zone_0
image:
get_input: bootimage
- size: 35*1024
+ size: 35
name:
str_replace:
template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume
- get_input: indx
- get_input:
- availability_zone_0
- size: 265*1024
+ size: 265
name:
str_replace:
template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume
- ocgapp_04
source_type: HEAT
param_name: ocgapp_volume_size_3
- type: float
+ type: scalar-unit.size
description: the size of the Cinder volume
- default: 400
+ default: 400 MB
constraints:
- in_range:
- 100
- ocgapp_03
source_type: HEAT
param_name: ocgapp_volume_size_2
- type: float
+ type: scalar-unit.size
description: the size of the Cinder volume
- default: 400
+ default: 400 MB
constraints:
- in_range:
- 100
- ocgapp_02
source_type: HEAT
param_name: ocgapp_volume_size_1
- type: float
+ type: scalar-unit.size
description: the size of the Cinder volume
- default: 400
+ default: 400 MB
constraints:
- in_range:
- 100
- ocgapp_01
source_type: HEAT
param_name: ocgapp_volume_size_0
- type: float
+ type: scalar-unit.size
description: the size of the Cinder volume
- default: 400
+ default: 400 MB
constraints:
- in_range:
- 100
properties:
volume_type:
get_input: ocgapp_volume_type_1
- size: '(get_input : ocgapp_volume_size_1) * 1024'
+ size:
+ get_input: ocgapp_volume_size_1
name:
str_replace:
template: VF_NAME_STACK_NAME_volume_1
properties:
volume_type:
get_input: ocgapp_volume_type_0
- size: '(get_input : ocgapp_volume_size_0) * 1024'
+ size:
+ get_input: ocgapp_volume_size_0
name:
str_replace:
template: VF_NAME_STACK_NAME_volume_1
properties:
volume_type:
get_input: ocgapp_volume_type_3
- size: '(get_input : ocgapp_volume_size_3) * 1024'
+ size:
+ get_input: ocgapp_volume_size_3
name:
str_replace:
template: VF_NAME_STACK_NAME_volume_3
properties:
volume_type:
get_input: ocgapp_volume_type_2
- size: '(get_input : ocgapp_volume_size_2) * 1024'
+ size:
+ get_input: ocgapp_volume_size_2
name:
str_replace:
template: VF_NAME_STACK_NAME_volume_2
properties:
volume_type:
get_input: volume_type
- size: '(get_input : size) * 1024'
+ size:
+ get_input: size
name:
str_replace:
template: VF_NAME_STACK_NAME_INDEX
#file version 1.0
parameters:
vnf_name: 'zrdm5avocg01'
- ocgapp_volume_size_0: 400
+ ocgapp_volume_size_0: 400 MB
ocgapp_volume_type_0: SF-Default-SSD
#file version 1.0
parameters:
vnf_name: 'zrdm5avocg01'
- ocgapp_volume_size_1: 400
+ ocgapp_volume_size_1: 400 MB
ocgapp_volume_type_1: SF-Default-SSD
#file version 1.0
parameters:
vnf_name: 'zrdm5avocg01'
- ocgapp_volume_size_2: 400
+ ocgapp_volume_size_2: 400 MB
ocgapp_volume_type_2: SF-Default-SSD
#file version 1.0
parameters:
vnf_name: 'zrdm5avocg01'
- ocgapp_volume_size_3: 400
+ ocgapp_volume_size_3: 400 MB
ocgapp_volume_type_3: SF-Default-SSD
- availability_zone_0
image:
get_input: bootimage
- size: 35*1024
+ size: 35
name:
str_replace:
template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume
- get_input: indx
- get_input:
- availability_zone_0
- size: 265*1024
+ size: 265
name:
str_replace:
template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_0:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
get_input: FSB_1_image
volume_type:
get_input: volume_type
- size: 3*1024
+ size: 3
name:
get_input: FSB1_volume_name
groups:
- vmme_small
source_type: HEAT
param_name: volume_size
- type: string
+ type: float
description: volume
fsb2-image:
hidden: false
get_input: FSB_1_image
volume_type:
get_input: volume_type
- size: 3*1024
+ size: 3
name:
get_input: FSB1_volume_name
testConvertGetParamFunctions:
get_input: FSB_2_image
volume_type:
get_input: volume_type
- size: '(get_input : volume_size) * 1024'
+ size:
+ get_input: volume_size
name:
get_input: FSB2_volume_name
FSB1_OAM:
type: string
description: volume
volume_size:
- type: string
+ type: number
description: volume
FSB1_volume_name:
type: string
get_input: FSB_1_image
volume_type:
get_input: volume_type
- size: '(get_input : volume_size) * 1024'
+ size:
+ get_input: volume_size
read_only: true
name:
get_input: FSB1_volume_name
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
lb2_eca_traffic_port:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
cmaui1_volume:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
nems_traffic_net:
type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
properties:
properties:
volume_type:
get_input: ARB_volume_type
- size: '(get_input : arb_volume_size) * 1024'
+ size:
+ get_input: arb_volume_size
eca_trx12_port_1:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
eca_trx7_port_2:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
eca_trx3_port_1:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
nems_imap_net:
type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
properties:
properties:
volume_type:
get_input: NEMS_FE_volume_type
- size: '(get_input : nems_volume_size) * 1024'
+ size:
+ get_input: nems_volume_size
server_nems_be1:
type: org.openecomp.resource.vfc.nodes.heat.nems_be
properties:
properties:
volume_type:
get_input: ECA_OAM_volume_type
- size: '(get_input : oam_volume_size) * 1024'
+ size:
+ get_input: oam_volume_size
server_nems_fe2:
type: org.openecomp.resource.vfc.nodes.heat.nems_fe
properties:
properties:
volume_type:
get_input: ECA_OAM_volume_type
- size: '(get_input : oam_volume_size) * 1024'
+ size:
+ get_input: oam_volume_size
lb2_cor_direct_port:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: NEMS_BE_volume_type
- size: '(get_input : nems_be_volume_size) * 1024'
+ size:
+ get_input: nems_be_volume_size
server_mmsc4:
type: org.openecomp.resource.vfc.nodes.heat.mmsc
properties:
properties:
volume_type:
get_input: NEMS_FE_volume_type
- size: '(get_input : nems_volume_size) * 1024'
+ size:
+ get_input: nems_volume_size
eca_trx10_port_2:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
relationship_templates:
mmsc1_volume_attachment:
type: org.openecomp.relationships.VolumeAttachesTo
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
lb2_eca_traffic_port:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
cmaui1_volume:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
nems_traffic_net:
type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
properties:
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
eca_trx7_port_2:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
eca_trx3_port_1:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
nems_imap_net:
type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
properties:
properties:
volume_type:
get_input: NEMS_FE_volume_type
- size: '(get_input : nems_volume_size) * 1024'
+ size:
+ get_input: nems_volume_size
server_nems_be1:
type: org.openecomp.resource.vfc.nodes.heat.nems_be
properties:
properties:
volume_type:
get_input: NEMS_BE_volume_type
- size: '(get_input : nems_be_volume_size) * 1024'
+ size:
+ get_input: nems_be_volume_size
server_mmsc4:
type: org.openecomp.resource.vfc.nodes.heat.mmsc
properties:
properties:
volume_type:
get_input: NEMS_FE_volume_type
- size: '(get_input : nems_volume_size) * 1024'
+ size:
+ get_input: nems_volume_size
eca_trx10_port_2:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: MMSC_volume_type
- size: '(get_input : mmsc_cinder_volume_size) * 1024'
+ size:
+ get_input: mmsc_cinder_volume_size
relationship_templates:
nems1_fe_volume_attachment:
type: org.openecomp.relationships.VolumeAttachesTo
properties:
volume_type:
get_input: ARB_volume_type
- size: '(get_input : arb_volume_size) * 1024'
+ size:
+ get_input: arb_volume_size
oam1_instance:
type: org.openecomp.resource.vfc.nodes.heat.eca
properties:
properties:
volume_type:
get_input: ECA_OAM_volume_type
- size: '(get_input : oam_volume_size) * 1024'
+ size:
+ get_input: oam_volume_size
oam1_volume:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: ECA_OAM_volume_type
- size: '(get_input : oam_volume_size) * 1024'
+ size:
+ get_input: oam_volume_size
oam1_int_port:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_0:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
get_input: FSB_1_image
volume_type:
get_input: volume_type
- size: 3*1024
+ size: 3
read_only:
get_input: stam
name:
get_input: FSB_2_image
volume_type:
get_input: volume_type
- size: '(get_input : volume_size) * 1024'
+ size:
+ get_input: volume_size
read_only: true
name:
get_input: FSB2_volume_name
get_input: FSB_1_image
volume_type:
get_input: volume_type
- size: 3*1024
+ size: 3
read_only: true
name:
get_input: FSB1_volume_name
get_input: FSB_2_image
volume_type:
get_input: volume_type
- size: '(get_input : volume_size) * 1024'
+ size:
+ get_input: volume_size
read_only: true
name:
get_input: FSB2_volume_name
plt_volume_shared_0:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
- size: '(get_input : plt_servicedata2_volume_size_0) * 1024'
+ size:
+ get_input: plt_servicedata2_volume_size_0
name:
str_replace:
template: $vnf_name-plt_volume_shared_0
app_volume_1:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
- size: '(get_input : app_volume_size_0) * 1024'
+ size:
+ get_input: app_volume_size_0
name:
str_replace:
template: $vnf_name-app_volume_1
app_volume_2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
- size: '(get_input : app_volume_size_0) * 1024'
+ size:
+ get_input: app_volume_size_0
name:
str_replace:
template: $vnf_name-app_volume_2
app_volume_0:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
- size: '(get_input : app_volume_size_0) * 1024'
+ size:
+ get_input: app_volume_size_0
name:
str_replace:
template: $vnf_name-app_volume_0
plt_volume_1:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
- size: '(get_input : plt_servicedata1_volume_size_0) * 1024'
+ size:
+ get_input: plt_servicedata1_volume_size_0
name:
str_replace:
template: $vnf_name-plt_volume_1
plt_volume_0:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
- size: '(get_input : plt_servicedata1_volume_size_0) * 1024'
+ size:
+ get_input: plt_servicedata1_volume_size_0
name:
str_replace:
template: $vnf_name-plt_volume_0
properties:
availability_zone:
get_input: availability_zone_0
- size: '(get_input : oam_volume_size_0) * 1024'
+ size:
+ get_input: oam_volume_size_0
name:
str_replace:
template: $VNF$DELoam$DELvolume$DEL0
properties:
availability_zone:
get_input: availability_zone_1
- size: '(get_input : oam_volume_size_0) * 1024'
+ size:
+ get_input: oam_volume_size_0
name:
str_replace:
template: $VNF$DELoam$DELvolume$DEL1
properties:
availability_zone:
get_input: availability_zone_0
- size: '(get_input : cif_volume_size_0) * 1024'
+ size:
+ get_input: cif_volume_size_0
name:
str_replace:
template: $VNF$DELcif$DELvolume$DEL0
properties:
availability_zone:
get_input: availability_zone_1
- size: '(get_input : cif_volume_size_0) * 1024'
+ size:
+ get_input: cif_volume_size_0
name:
str_replace:
template: $VNF$DELcif$DELvolume$DEL1
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_dbc_volume_size_0) * 1024'
+ size:
+ get_input: vson_dbc_volume_size_0
name:
get_input: vson_dbc_volume_name_0
description: vSON DB Config cinder volume.
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_mdr_volume_size_0) * 1024'
+ size:
+ get_input: vson_mdr_volume_size_0
name:
get_input: vson_mdr_volume_name_0
description: |
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_mgt_volume_size_0) * 1024'
+ size:
+ get_input: vson_mgt_volume_size_0
name:
get_input: vson_mgt_volume_name_0
description: |
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_mon_volume_size_0) * 1024'
+ size:
+ get_input: vson_mon_volume_size_0
name:
get_input: vson_mon_volume_name_0
description: |
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_cll_volume_size_2) * 1024'
+ size:
+ get_input: vson_cll_volume_size_2
name:
str_replace:
template: VNF_NAME_cll_volume_2
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_cll_volume_size_0) * 1024'
+ size:
+ get_input: vson_cll_volume_size_0
name:
str_replace:
template: VNF_NAME_cll_volume_0
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_cll_volume_size_1) * 1024'
+ size:
+ get_input: vson_cll_volume_size_1
name:
str_replace:
template: VNF_NAME_cll_volume_1
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_dbs_volume_size_1) * 1024'
+ size:
+ get_input: vson_dbs_volume_size_1
name:
get_input: vson_dbs_volume_name_1
description: Cinder volume for the second vSON DBS VM instance.
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_dbs_volume_size_0) * 1024'
+ size:
+ get_input: vson_dbs_volume_size_0
name:
get_input: vson_dbs_volume_name_0
description: Cinder volume for the first vSON DBS VM instance.
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_dcl_volume_size_2) * 1024'
+ size:
+ get_input: vson_dcl_volume_size_2
name:
str_replace:
template: VNF_NAME_dcl_volume_2
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_dcl_volume_size_0) * 1024'
+ size:
+ get_input: vson_dcl_volume_size_0
name:
str_replace:
template: VNF_NAME_dcl_volume_0
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_dcl_volume_size_1) * 1024'
+ size:
+ get_input: vson_dcl_volume_size_1
name:
str_replace:
template: VNF_NAME_dcl_volume_1
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_dbg_volume_size_0) * 1024'
+ size:
+ get_input: vson_dbg_volume_size_0
name:
get_input: vson_dbg_volume_name_0
description: vSON DB Global cinder volume.
get_input: vnf_name
vf_module_name:
get_input: vf_module_name
- size: '(get_input : vson_app_volume_size_0) * 1024'
+ size:
+ get_input: vson_app_volume_size_0
name:
get_input: vson_app_volume_name_0
description: vSON APP cinder volume.
properties:
availability_zone:
get_input: availability_zone_0
- size: '(get_input : oam_volume_size_0) * 1024'
+ size:
+ get_input: oam_volume_size_0
name:
str_replace:
template: $VNF$DELoam$DELvolume$DEL0
properties:
availability_zone:
get_input: availability_zone_1
- size: '(get_input : oam_volume_size_0) * 1024'
+ size:
+ get_input: oam_volume_size_0
name:
str_replace:
template: $VNF$DELoam$DELvolume$DEL1
properties:
availability_zone:
get_input: availability_zone_0
- size: '(get_input : cif_volume_size_0) * 1024'
+ size:
+ get_input: cif_volume_size_0
name:
str_replace:
template: $VNF$DELcif$DELvolume$DEL0
properties:
availability_zone:
get_input: availability_zone_1
- size: '(get_input : cif_volume_size_0) * 1024'
+ size:
+ get_input: cif_volume_size_0
name:
str_replace:
template: $VNF$DELcif$DELvolume$DEL1
properties:
volume_type:
get_input: pd01_volume_type
- size: '(get_input : pd01_cinder_volume_size) * 1024'
+ size:
+ get_input: pd01_cinder_volume_size
abstract_pd_server:
type: org.openecomp.resource.abstract.nodes.pd_server
directives:
properties:
volume_type:
get_input: pd01_volume_type
- size: '(get_input : pd01_cinder_volume_size) * 1024'
+ size:
+ get_input: pd01_cinder_volume_size
abstract_pd_server:
type: org.openecomp.resource.abstract.nodes.pd_server
directives:
properties:
volume_type:
get_input: pd01_volume_type
- size: '(get_input : pd01_cinder_volume_size) * 1024'
+ size:
+ get_input: pd01_cinder_volume_size
packet_internal_network:
type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
properties:
get_input: FSB_1_image
volume_type:
get_input: volume_type
- size: '(get_input : volume_size) * 1024'
+ size:
+ get_input: volume_size
name:
get_input: FSB1_volume_name
FSB2_volume:
get_input: FSB_2_image
volume_type:
get_input: volume_type
- size: '(get_input : volume_size) * 1024'
+ size:
+ get_input: volume_size
name:
get_input: FSB2_volume_name
abstract_VLC2:
- allowed_address_pair
- 0
- mac
- size: 50*1024
+ size: 50
name:
get_attribute:
- abstract_pd_server
get_attribute:
- abstract_pd_server
- pd_server_pd01_port_0_port_security_enabled
- size: '(get_attribute : [pd01_port_0, network]) * 1024'
+ size:
+ get_attribute:
+ - abstract_pd_server
+ - pd_server_pd01_port_0_network
read_only:
get_attribute:
- abstract_pd_server
get_input: FSB_1_image
volume_type:
get_input: volume_type
- size: '(get_input : volume_size) * 1024'
+ size:
+ get_input: volume_size
read_only: true
name:
get_input: FSB1_volume_name
parameters:
- pcrf_oam_vol_size: 500
+ pcrf_oam_vol_size: 500 GB
pcrf_oam_volume_silver-1: Silver
pcrf_oam_volume_silver-2: Silver
pcrf_oam_vol_name_1: sde1-pcrfx01-oam001-vol-1
- hot-nimbus-oam_v1.0
source_type: HEAT
param_name: pcrf_oam_vol_size
- type: float
+ type: scalar-unit.size
description: the size of the Cinder volume
- default: 500
+ default: 500 GB
pcrf_oam_vol_name_2:
label: OAM volume name 2
hidden: false
properties:
volume_type:
get_input: pcrf_oam_volume_silver-1
- size: '(get_input : pcrf_oam_vol_size) * 1024'
+ size:
+ get_input: pcrf_oam_vol_size
name:
get_input: pcrf_oam_vol_name_1
server_pcrf_oam_001:
properties:
volume_type:
get_input: pcrf_pcm_volume_silver
- size: '(get_input : pcrf_pcm_vol_size) * 1024'
+ size:
+ get_input: pcrf_pcm_vol_size
name:
get_input: pcrf_pcm_vol_name_1
server_pcrf_ppd_001:
properties:
volume_type:
get_input: pcrf_oam_volume_silver-2
- size: '(get_input : pcrf_oam_vol_size) * 1024'
+ size:
+ get_input: pcrf_oam_vol_size
name:
get_input: pcrf_oam_vol_name_2
server_pcrf_psm_009:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_resourceGroup:
type: org.openecomp.resource.abstract.nodes.heat.nested3
directives:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
main_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
main_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
server_cmaui21:
type: org.openecomp.resource.vfc.nodes.heat.cmaui
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_1:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_resourceGroup:
type: org.openecomp.resource.abstract.nodes.heat.nested3
directives:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_nova:
type: org.openecomp.resource.vfc.nodes.heat.jsa
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_nested:
type: org.openecomp.resource.abstract.nodes.heat.nested
directives:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_1:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_1:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_resourceGroup:
type: org.openecomp.resource.abstract.nodes.heat.nested3
directives:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_nova:
type: org.openecomp.resource.vfc.nodes.heat.jsa
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_vol2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_nested:
type: org.openecomp.resource.abstract.nodes.heat.nested
directives:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_vol2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
server_cmaui:
type: org.openecomp.resource.vfc.nodes.heat.cmaui
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_1:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_vol2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
test_nested:
type: org.openecomp.resource.abstract.nodes.heat.nested
directives:
properties:
volume_type:
get_input: qrouter_volume_type_1
- size: '(get_input : qrouter_volume_size_1) * 1024'
+ size:
+ get_input: qrouter_volume_size_1
description:
get_input: qrouter_volume_name_1
qrouter_volume_0:
properties:
volume_type:
get_input: qrouter_volume_type_0
- size: '(get_input : qrouter_volume_size_0) * 1024'
+ size:
+ get_input: qrouter_volume_size_0
description:
get_input: qrouter_volume_name_0
qrouter_volume_2:
properties:
volume_type:
get_input: qrouter_volume_type_2
- size: '(get_input : qrouter_volume_size_2) * 1024'
+ size:
+ get_input: qrouter_volume_size_2
description:
get_input: qrouter_volume_name_2
QRouter1:
properties:
volume_type:
get_input: vLBAgent_volume_type_0
- size: '(get_input : vLBAgent_volume_size_0) * 1024'
+ size:
+ get_input: vLBAgent_volume_size_0
description:
get_input: vLBAgent_volume_name_0
vLBAgent_volume_1:
properties:
volume_type:
get_input: vLBAgent_volume_type_1
- size: '(get_input : vLBAgent_volume_size_1) * 1024'
+ size:
+ get_input: vLBAgent_volume_size_1
description:
get_input: vLBAgent_volume_name_1
oam_private_net_network_port_3:
properties:
volume_type:
get_input: vLBAgent_volume_type_2
- size: '(get_input : vLBAgent_volume_size_2) * 1024'
+ size:
+ get_input: vLBAgent_volume_size_2
description:
get_input: vLBAgent_volume_name_2
packet_internal_network_port:
properties:
volume_type:
get_input: vLB_volume_type_1
- size: '(get_input : vLB_volume_size_1) * 1024'
+ size:
+ get_input: vLB_volume_size_1
vLB_volume_0:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: vLB_volume_type_0
- size: '(get_input : vLB_volume_size_0) * 1024'
+ size:
+ get_input: vLB_volume_size_0
vLB_volume_2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: vLB_volume_type_2
- size: '(get_input : vLB_volume_size_2) * 1024'
+ size:
+ get_input: vLB_volume_size_2
vLBInstance:
type: org.openecomp.resource.vfc.nodes.heat.vLB
properties:
properties:
volume_type:
get_input: vprobe_volume_type_2
- size: '(get_input : vprobe_volume_size_2) * 1024'
+ size:
+ get_input: vprobe_volume_size_2
description:
get_input: vprobe_volume_name_2
vprobe_volume_1:
properties:
volume_type:
get_input: vprobe_volume_type_1
- size: '(get_input : vprobe_volume_size_1) * 1024'
+ size:
+ get_input: vprobe_volume_size_1
description:
get_input: vprobe_volume_name_1
vprobe_volume_0:
properties:
volume_type:
get_input: vprobe_volume_type_0
- size: '(get_input : vprobe_volume_size_0) * 1024'
+ size:
+ get_input: vprobe_volume_size_0
description:
get_input: vprobe_volume_name_0
oam_private_net_network_port_1:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
FSB1:
type: org.openecomp.resource.abstract.nodes.FSB1
directives:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
abstract_FSB:
type: org.openecomp.resource.abstract.nodes.FSB
directives:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
abstract_FSB:
type: org.openecomp.resource.abstract.nodes.FSB
directives:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume3:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume4:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume3:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume4:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
abstract_FSB:
type: org.openecomp.resource.abstract.nodes.FSB
directives:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
groups:
ep-jsa_net_group:
type: org.openecomp.groups.heat.HeatStack
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume3:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume4:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
packet_mirror_network:
type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume3:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume4:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
packet_mirror_network:
type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
packet_mirror_network:
type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_volume2:
type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
packet_mirror_network:
type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
properties:
get_input: FSB_1_image
volume_type:
get_input: volume_type
- size: '(get_input : volume_size) * 1024'
+ size:
+ get_input: volume_size
name:
get_input: FSB1_volume_name
FSB1_OAM:
get_input: FSB_2_image
volume_type:
get_input: volume_type
- size: '(get_input : volume_size) * 1024'
+ size:
+ get_input: volume_size
name:
get_input: FSB2_volume_name
Internal1-net:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_0:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_0:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_0:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
properties:
volume_type:
get_input: CMAUI_volume_type
- size: '(get_input : cmaui_cinder_volume_size) * 1024'
+ size:
+ get_input: cmaui_cinder_volume_size
cmaui_port_0:
type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
properties:
@Test
public void shouldReturnApproppriatePropertyTypeWhenDisplayNameExist() {
String s = "scalar-unit.size";
- Assert
- .assertEquals(PropertyType.getPropertyTypeByDisplayName(s), PropertyType.SCALAR_UNIT_SIZE);
+ Assert.assertEquals(PropertyType.getPropertyTypeByDisplayName(s), PropertyType.SCALAR_UNIT_SIZE);
}
}